3 ms·
My results are on a 2021 Apple M1 MacBook Pro. And I'd like to reiterate it's not 100% apples to apples comparing fluxsort and glidesort directly. One would ne
by orlp 4y ago
My results are on a 2021 Apple M1 MacBook Pro.
And I'd like to reiterate it's not 100% apples to apples comparing fluxsort and glidesort directly. One would need to either completely implement glidesort in unsafe C throwing Rust-isms as move-only types and panic safety out of the window, or implement fluxsort in Rust with the move-only restrictions and with the ability to restore all data in case of a panic. Only then could you truly compare the algorithms 100% fairly.
- nurettin 4y agoIn this particular case it sounds like Rust is just making things more tedious rather than providing value.
- kzrdude 4y agoThe end result is a generic sorting algorithm for Rust, which can be used for a lot of things /in Rust/, so it adds value to the Rust ecosystem. The sorting algorithm doesn't add anything without users :) so for non-academic implementations, maybe using it in Rust projects is what the author wants. Rust is also quite open to contributions, so it might be exciting if there's a chance to have it in Rust std.
- nurettin 4y agoI understand that it is written in Rust for Rust's sake, but in this case it looks like it doesn't really provide any benefit to implement such an algorithm particularly in Rust due to Rust's memory model making it harder to sort integers efficiently.
- kzrdude 4y agoI think such issues can be resolved with some collaboration, it's too early to say right now at least.