On Wed, Mar 27, 2013 at 4:46 AM, J. Ian Johnson <[email protected]> wrote: > I can't really test what you've posted (no stress-testing code), and you also > compare safe versus unsafe accessors, which skews things.
It was not meant to be testable code, just an example to frame the specific case I was talking about. When I did the test both fragment were using the same kind of accessors, of course. Attached there is a complete runnable program (with both procedures using unsafe accessors). I obtain these timings: using risolvi-2 (nested fors): > (time (test 1000 "e:/Local/Documents/Scheme/temp-3")) cpu time: 16234 real time: 16286 gc time: 78 > (time (test 1000 "e:/Local/Documents/Scheme/temp-3")) cpu time: 16453 real time: 16493 gc time: 63 using risolvi-3 (a single for*): > (time (test 1000 "e:/Local/Documents/Scheme/temp-3")) cpu time: 18078 real time: 18184 gc time: 1313 > (time (test 1000 "e:/Local/Documents/Scheme/temp-3")) cpu time: 17735 real time: 17810 gc time: 141 This is a 10% difference on the the time for the whole program, which comprises parts other than this loop, so the difference for the loop only should be even greater. Cheers P.
sexomini-con-for.rkt
Description: Binary data
____________________ Racket Users list: http://lists.racket-lang.org/users

