←back to thread

Zlib-rs is faster than C

(trifectatech.org)
341 points dochtman | 2 comments | | HN request time: 0s | source
1. throwaway2037 ◴[] No.43385042[source]
Does this performance have anything to do with Rust itself, or is it just more optimized than the other C-language versions (more SIMD instructions / raw assembly code)? I ask because there is a canonical use case where C++ can consistently outperform C -- sorting, because the comparison operator in C++ allows for more compiler optimization compared to the C version: qsort(). I am wondering if there is something similar here for Rust vs C.
replies(1): >>43385064 #
2. anonymoushn ◴[] No.43385064[source]
these are facts about the C and C++ stdlib sort functions which nobody should really use.