Hacker News new | ask | show | jobs
by sc11 1658 days ago
Do you mind sharing the Julia code? Seems odd that it's that far away from even Python.
2 comments

by default Julia uses locking for writes to guarantee thread safety when multiple writes are happening. That said, it's totally possible to go way faster using buffered IO.
``` for i = 1:typemax(UInt64) s = "" if i % 3 == 0 s = s * "fizz" end if i % 5 == 0 s = s * "buzz" end if s == "" s = string(i) end println(s) end ```

Measured over 10 s after a 10 s burn-in period, Julia 1.7 on Ubuntu 21.10.