←back to thread

Zlib-rs is faster than C

(trifectatech.org)
341 points dochtman | 1 comments | | HN request time: 0.205s | source
Show context
johnisgood ◴[] No.43381735[source]
"faster than C" almost always boils down to different designs, implementations, algorithms, etc.

Perhaps it is faster than already-existing implementations, sure, but not "faster than C", and it is odd to make such claims.

replies(10): >>43381810 #>>43381813 #>>43381820 #>>43381959 #>>43382108 #>>43382124 #>>43382267 #>>43385171 #>>43386202 #>>43392542 #
kgeist ◴[] No.43382108[source]
I heard that aliasing in C prevents the compiler from optimizing aggressively. I can believe Rust's compiler can optimize more aggressively if there's no aliasing problem.
replies(1): >>43382303 #
layer8 ◴[] No.43382303[source]
C has the restrict type qualifier to express non-aliasing, hence it shouldn’t be a fundamental impediment.
replies(2): >>43383302 #>>43383607 #
anon-3988 ◴[] No.43383607[source]
> fundamental impediment

This is an interesting word. I wonder why no one has written high performance library code in assembly yet at this point?

replies(2): >>43385867 #>>43388117 #
1. johnisgood ◴[] No.43385867[source]
Well, most of them is written in C/C++ and Fortran, is it not the case?