←back to thread

Zlib-rs is faster than C

(trifectatech.org)
341 points dochtman | 2 comments | | HN request time: 0.41s | 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 #
qweqwe14 ◴[] No.43381813[source]
The fact that it's faster than the C implementation that surely had more time and effort put into it doesn't look good for C here.
replies(3): >>43381819 #>>43382282 #>>43385271 #
vkou ◴[] No.43382282[source]
I think you'll find that if you re-write an application, feature-for-feature, without changing its language, the re-written version will be faster.
replies(1): >>43383356 #
renewiltord ◴[] No.43383356[source]
This is known as the Second System Effect: where Great Rewrites always succeed in making a more performant thing.
replies(1): >>43386989 #
1. cb321 ◴[] No.43386989[source]
I am not sure if the semantics have drifted over the decades to what you say, but this seems not quite right according to wikipedia: https://en.wikipedia.org/wiki/Second-system_effect

EDIT: but I do agree that starting greenfield from an old code base is often a path towards performance.

replies(1): >>43395103 #
2. renewiltord ◴[] No.43395103[source]
Just having a laugh, mate, but it is nice to have the truth posted as well.