Boehm GC performance is being handicapped in the current Nim version because it 
defaults to using all interior pointers. This leads to a minimum of one byte of 
padding being added, which in this case doubles the allocation size to four 
words rather than two. You want to compile with `-d:boehmNoIntPtr` to get 
significantly better performance out of the Boehm GC; it still beats `--gc:arc` 
in this particular example for me, though not by much.

(The Boehm GC allocates memory in multiples of two words. Depending on the 
actual object size, adding one byte of padding can increase allocation size by 
two words). The padding is necessary with interior pointers enabled to 
distinguish between pointers to the end of an object and one to the beginning 
of the next object.)

Reply via email to