El El jue, 2 feb 2017 a las 5:24, Arne Babenhauserheide <arne_...@web.de>
escribió:

>
> Germán Diago <germandi...@gmail.com> writes:
>
> >> Aside from using a more recent Guile, I do not see obvious
> >> optimizations, however (more exactly: all my tries to speedup the code
> >> only made it slower).
> >
> > I was struggling with using read-line! instead of read-line but
> > experimenting in the command line
> > I cannot figure out how it works actually. read-line! will reuse a
> buffered
> > string. There was lots of time spent there, I am not sure if because of
> > allocations or just because of I/O. If someone could tell me how to do
> it...
>
> One thing I realized now is that you might be able to avoid the
> string->number conversion completely since you’re outputting as text
> anyway. That might save 1/4th of the time (but I did not experiment with
> that now).


True.


> Also I’m not sure whether the "is this a number"-check could be sped up
> by adding specialization for chars in the Scheme-compiler, similar to
> how floating point comparisons were added in the latest release:
>
> https://git.dthompson.us/guile.git/commitdiff/79fa147990021b48a5ede2f33441bc95721fe63d
>
> > Thanks for your time Arne!
>
> Thank you for the challenging problem


Welcome!! :)

Reply via email to