Interpreted code shows average n about 9064 (peak value was 9193), compiled code - 9210 (peak value was 9226).
Code was compiled with "(declare (not safe))" to get more speed.
Without this declaration difference between interpreted and compiled code is much less, ~9064 and ~9143 in average, accordingly.
Vasil
On 28-Jan-09, at 2:03 PM, vasil wrote:
After update scheme code displays n from 9040 to 9192.
Great! The discrepancy with the ideal result of 10000 is due to the interpretation overhead for the code executed between successive calls to thread-sleep! (you will probably get slightly higher numbers if you compile the code). So the resolution is much improved.
Marc