Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I felt I could rewrite it in Rust within two hours.

I'm not sure what to conclude given the title of this post. Rewrites often improve things greatly. But a 2 hour time investment is not what anyone is talking about when they repeat mottos like "never rewrite."



Also, this is especially funny since I found the change for the Julia version that makes it 5x faster in approximately the time it took me to read the code.


That’s fair! It doesn’t go near the ballpark performance I was going after, though.

It’s hard to assess to which extent the performance tweaking vs. rewriting tradeoff scales up. For a larger project, the rewrite could take a month; but maybe, diminishing returns helping, the performance tweaking would plateau short of a month.


https://discourse.julialang.org/t/rust-julia-comparison-post... seems to be about 2x faster than the (optimized) Rust version with some minor tweaks to the Julia code so perhaps that is more in your ballpark?


Absolutely, that is what I was hoping for!

So, vcat() instead of append!(). Darn. Faith in Julia restored. I’ll update the article.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: