[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #1219: read-char could be better optimized
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #1219: read-char could be better optimized |
Date: |
Mon, 07 Sep 2015 19:06:48 -0000 |
#1219: read-char could be better optimized
---------------------+---------------------
Reporter: sjamaan | Owner:
Type: defect | Status: new
Priority: major | Milestone: someday
Component: unknown | Version: 4.9.x
Keywords: |
---------------------+---------------------
Currently, there are two issues with {{{read-char}}}:
* It calls {{{##sys#read-char/port}}}, which is itself a CPS procedure
(consuming needless CPU cycles and stack). This will get rewritten in
{{{c-platform.scm}}} to a direct call to {{{##sys#read-char/port}}} with
fixed argcount. Is omitting argcount check really that much faster? Why
not rewrite it to the complete body of {{{##sys#read-char/port}}} instead?
* Equally important, the {{{##sys#check-input-port}}} call in {{{##sys
#read-char/port}}} is not being specialized, even though there's an entry
in {{{types.db}}}(!) This also causes an extra needless CPS call, because
it can (and should) be inlined.
Once this is fixed, we should run the {{{slatex}}}, {{{kernwyk-wc}}} and
{{{kernwyk-cat}}} benchmarks to see how much of an improvement this is.
--
Ticket URL: <http://bugs.call-cc.org/ticket/1219>
CHICKEN Scheme <http://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #1219: read-char could be better optimized,
Chicken Trac <=