[racket] The performance of fannkuch-redux

From: Haiwei Zhou (highfly22 at gmail.com)
Date: Fri Feb 22 04:51:50 EST 2013

Hi,

  I wrote a simple script for fannkuch redux.
https://github.com/highfly22/fannkuch-redux/blob/master/fannkuch-redux.rkt

  The result of this script is about 10 minutes in my i7 machine, which is
better than Python, lua and ruby. Is the result expected? Do I miss
something?

  I have tried to use unsafe op. That may reduces about 30 seconds.

  The optimizer couch complains the missed inline on the most time spent
functions - flip and flip-count. I tried to re-write the functions to
macros. But it doesn't change anything.

  I also tried to re-write in the typed/racket. It doesn't help either.

  Finally, I try to use future. There is not a blocking operation in the
future-visualizer. But it's twice slow than normal version. Maybe task
(each flip-count) is too trivial for this job.

Thanks,
Haiwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130222/64ba8f5d/attachment.html>

Posted on the users mailing list.