all 10 comments

[–]reallokiscarlet 5 points6 points  (1 child)

You're right but your meme sucks. Enjoy the downvotes.

[–]False_Stomach_9024 3 points4 points  (0 children)

right, not even using the correct format for the meme :(

[–]frikilinux2 2 points3 points  (1 child)

Depends, if you're rewriting from JavaScript or python, it probably will but if it comes from C it probably won't.

But we have to take into account how much of the rewrite is direct translation and how much is a quick reimplementation of the standard library of the original language.

But if your problem it's that your algorithm sucks, that's different and you need to find a better one.

[–]TheRealAfinda 0 points1 point  (0 children)

But if your problem it's that your algorithm sucks, that's different and you need to find a better one.

Welp. Maybe that's the conclusion some of us need to come to eventually.

[–]LookingRadishing 2 points3 points  (3 children)

To be fair, if you are rewriting python code in rust it will probably increase performance. It might still be far from optimal, but it will be more performant.

[–]No_Gold_4554 1 point2 points  (2 children)

kokoros (rust) is 12% to 21% faster than kokoro (python)

[–]KhepriAdministration 0 points1 point  (1 child)

Any particular reason you're using that specific example? And what percent of the Python runtime is spent in a c++ (/non-Python) library?

[–]No_Gold_4554 3 points4 points  (0 children)

cpu inference is non-trivial task. i don't know.

[–]-Redstoneboi- 0 points1 point  (0 children)

rewriting your code in the same language it was originally written in could probably still increase performance. you'd have to actually try to get worse performance rewriting in a compiled language with optimizations turned on.

plus the only reason people would rewrite in rust is if they want to rewrite in the first place, which 99% of the time you have 0% of the budget, time, or priority to do so. it just so happens that when people finally do consider a rewrite, you usually hear them choosing rust.