3 ms·
Swift is coming to Android. That may improve traction. [1] Having just ported a small library from Rust to Swift, it’s fairly clear that Rust is ridiculously f
by willtemperley 1y ago
Swift is coming to Android. That may improve traction. [1]
Having just ported a small library from Rust to Swift, it’s fairly clear that Rust is ridiculously fast but Swift is just so much more readable. Much easier to debug too.
Also - why would Rust only have a max-heap? In the library I ported, the authors had to reverse the algorithmic logic in the entire library for this.
Even though it’s only about half as fast as Rust, Swift performance does start to shine with concurrency.
[1] https://www.swift.org/android-workgroup/ https://www.swift.org/android-workgroup/
- steveklabnik 1y ago> Also - why would Rust only have a max-heap? In the library I ported, the authors had to reverse the algorithmic logic in the entire library for this. All you have to do is use a small wrapper type and you get a min heap https://doc.rust-lang.org/std/collections/struct.BinaryHeap.html#min-heap https://doc.rust-lang.org/std/collections/struct.BinaryHeap....
- willtemperley 1y agoWhich shows that Rust devs care very little for ergonomics.
- steveklabnik 1y agoDepending on how you define “ergonomics,” I guess. I think only needing to provide a comparison function is pretty elegant, rather than duplicating the data structure. YMMV.