6 ms·
Your Rust example is kind of odd. Did you not see the linting errors in your editor or from the compiler? You can basically boil it down to just two lines of Ru
by mmstick 10y ago
Your Rust example is kind of odd. Did you not see the linting errors in your editor or from the compiler? You can basically boil it down to just two lines of Rust.
https://gist.github.com/mmstick/a8316ba0514f9d9ab33b18fa9b916ca1 https://gist.github.com/mmstick/a8316ba0514f9d9ab33b18fa9b91...
As for timing, I'm doubtful that Go is any faster than Rust. I don't have this www.js file so I can't test it on my laptop, but I'm pretty sure you didn't even attempt to do things like enabling LTO, setting O3, disabling jemalloc, and using the musl target. All these things can make significant differences to the performance of the binary that's produced.
- lossolo 10y agoI don't know if you noticed but we are discussing naive solutions which I've mentioned couple of times in previous posts. Code you linked is not naive solution. Things you proposed to do are not naive either.
- AsyncAwait 10y agoHere's the thing; it is a naive solution. You may not want to accept it because that contradicts your claim of the Go solution being faster, but at that point it becomes a he-said/she-said kind of scenario because I can claim that your Go solution isn't naive as well and have exactly the same "validity" for such a claim as you do.
- lossolo 10y agoAnyway this really doesn't matter as his solution is the slowest of all which confirms what I wrote and contradicts what he wrote. For me it's not naive solution. Do you have any proof it is? Can you mathematically prove that it's naive solution? I know I can't. For everyone naive solution is something different, what I saw in burntsushi reply and what I wrote myself is the closest to what I think are naive solutions. > like enabling LTO, setting O3, disabling jemalloc, and using the musl target. And this is for sure not part of naive solution either. > You may not want to accept it because that contradicts your claim of the Go solution being faster This is not true. You can find perf numbers of his solution in my second reply to him. Or you can compare those solutions yourself.
- AsyncAwait 10y ago> For me it's not naive solution. Do you have any proof it is? Can you mathematically prove that it's naive solution? You can't prove a negative.