[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Playing with guile (vs python). Generate file for GDP suitable for g
From: |
Arne Babenhauserheide |
Subject: |
Re: Playing with guile (vs python). Generate file for GDP suitable for gnuplot. |
Date: |
Wed, 01 Feb 2017 23:24:46 +0100 |
User-agent: |
mu4e 0.9.16; emacs 25.1.1 |
Germán Diago <address@hidden> 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).
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 :)
Best wishes and happy hacking!
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
signature.asc
Description: PGP signature
- Re: Playing with guile (vs python). Generate file for GDP suitable for gnuplot.,
Arne Babenhauserheide <=