<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div> I wrote a simple script for fannkuch redux. <a href="https://github.com/highfly22/fannkuch-redux/blob/master/fannkuch-redux.rkt">https://github.com/highfly22/fannkuch-redux/blob/master/fannkuch-redux.rkt</a><br>
<br></div> 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?<br><br></div> I have tried to use unsafe op. That may reduces about 30 seconds.<br>
<br></div> 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.<br><br></div><div> I also tried to re-write in the typed/racket. It doesn't help either.<br>
<br></div><div> Finally, I try to use future. There is not a blocking operation in the <span class="">future-visualizer</span><span class="">. But it's twice slow than normal version. Maybe task (each flip-count) is too trivial for this job.<br>
</span></div><div><br></div><div>Thanks,<br></div><div>Haiwei<br></div><div><br></div> <br></div>