[plt-scheme] iterate over characters in string

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Aug 13 12:15:21 EDT 2002

Jens Axel Søgaard wrote:
> I wrapped them in a modulo, so the optimizer got a fair
> chance. Furthermore I collect garbage before each test in
> order to get similar timings. The result was:
>
> orig
> cpu time: 3024 real time: 3024 gc time: 0
> mjr
> cpu time: 2123 real time: 2123 gc time: 0
> cu [ptg]
> cpu time: 1422 real time: 1422 gc time: 0
> jas
> cpu time: 3485 real time: 3485 gc time: 0
> jas2
> cpu time: 2924 real time: 2924 gc time: 0
> jas3
> cpu time: 4928 real time: 4928 gc time: 0
> jas4
> cpu time: 4677 real time: 4677 gc time: 0

Here are some timings, when I remove debuging
in the language details. I am somewaht unsure
how precise the timings are. I have a feeling
that they change a little from run to run.

cu
cpu time: 1492 real time: 1492 gc time: 0
orig
cpu time: 1612 real time: 1612 gc time: 0
mjr
cpu time: 2283 real time: 2283 gc time: 0
jas
cpu time: 2694 real time: 2694 gc time: 0
jas2
cpu time: 2343 real time: 2343 gc time: 0
jas3
cpu time: 2874 real time: 2874 gc time: 0
jas4
cpu time: 2404 real time: 2404 gc time: 0

As you can see, the difference in percent is smaller.
In particular the two last one became faster.

Is set! faster than I thought?

--
Jens Axel Søgaard





Posted on the users mailing list.