Rust versus Python and Julia to calculate word frequencies

preview_player
Показать описание
I show that Rust is faster than Python and Julia when calculating word frequencies in almost 40,000 text files with almost 300K words.

Рекомендации по теме
Комментарии
Автор

Closing over mutated local variables is extremely slow in Julia, you should only close over local constants.

georgerogers
Автор

Can you post a MWE of the julia implementation so I can see what went wrong? I find the results very hard to believe (there must be some low hanging fruit to optimize perf in the julia case).

nicklam
Автор

I tried everything seems like julia don't know the type of the values in eachmatch and that's causing recompilation (around 10% of the time is taken from there), I think it would be great to change it to use vector of char preallocated to avoid allocations and try to avoid regex match even if it means making loop over char as long as it compiles to machine code it will be fine

chrismen
Автор

Julia being slower is a surprise- given all the hype.

exxzxxe
Автор

Did you figure out what caused Julia to be so slow?

Mojo_DK
Автор

Need to wrap the outer loop in a function.

georgerogers
Автор

Julia is as fast as c for long ruhning tasks. It compiles every time you run a code... Do calculation in big you will see difference..

nathanruben