Replies: 1 comment 1 reply
-
Hi :) May I ask you if you're running the code in debug mode? Rust does check for integer overflow in debug mode, adding a bit of overhead in each iteration of your code. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, just sharing some stuff I'm playing around with. Idk if it's a fair comparison but I tried to compare the performance of two (in terms of just looping over 1,000x while summing and 100,000x)
Obviously Rust is faster, in the beginning at least.
But what's interesting is Dart actually becomes faster at some point? I honestly don't know the internals. This is also just in dev (
flutter run
).But here's a vid of just summing an iteration of 1,000x.
mini-dart-vs-rust-useconds.mp4
Then for 100,000x.
Rust is just slower lol.
Again take this with a grain of salt 🧂. Might not be a fair comparison to just compare with a dumb example. Idk where Rust would fare better?
Beta Was this translation helpful? Give feedback.
All reactions