- The code ends up using reflection. Try `(set! *warn-on-reflection* true)` to see the warnings so you can fix them
- The vthreads code starts time measurement, then creates and starts the threads, then joins, then ends the measurement. But the rthreads code first creates the threads, then starts the measurement, then starts the threads, then never joins. You end up comparing apples to oranges
The results on my machine, after the fixes:
virtual elapsed time (ms): 90
real elapsed time (ms): 45
Of course, it's still a microbenchmark and as such shouldn't be taken seriously for anything but hypothesis generation.
- The code ends up using reflection. Try `(set! *warn-on-reflection* true)` to see the warnings so you can fix them
- The vthreads code starts time measurement, then creates and starts the threads, then joins, then ends the measurement. But the rthreads code first creates the threads, then starts the measurement, then starts the threads, then never joins. You end up comparing apples to oranges
The results on my machine, after the fixes:
Of course, it's still a microbenchmark and as such shouldn't be taken seriously for anything but hypothesis generation.