top | item 29415742 (no title) sc11 | 4 years ago Do you mind sharing the Julia code? Seems odd that it's that far away from even Python. discuss order hn newest adgjlsfhk1|4 years ago 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. yodelshady|4 years ago ``` 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.
adgjlsfhk1|4 years ago 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.
yodelshady|4 years ago ``` 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.
adgjlsfhk1|4 years ago
yodelshady|4 years ago
Measured over 10 s after a 10 s burn-in period, Julia 1.7 on Ubuntu 21.10.