4 ms·
The repost[0] in r/golang shows similar critiques. This perf comparison is naive on many levels. - binary size (static vs. dynamic linking) - recursion is not
by dgb23 6y ago
The repost[0] in r/golang shows similar critiques. This perf comparison is naive on many levels.
- binary size (static vs. dynamic linking)
- recursion is not idiomatic in go, it is assumed that you write imperative for loops.
- mathematical functions like the Fibonacci sequence are a rather atypical computation use-case for a Go program (I don't know about Crystal). Tree/graph traversal/mutations would be a more fitting test. Or generally something that is composed of dynamically growing and shrinking slices and maps.
- http test apparently cannot be reproduced, some get better results for Go, some for Crystal.
- http tests w/o involving some parsing/marshaling/serialization or something along those lines aren't that useful. You usually want to either read or send some JSON string or similar.
[0] https://www.reddit.com/r/golang/comments/h0kogq/go_vs_crystal_performance/ https://www.reddit.com/r/golang/comments/h0kogq/go_vs_crysta...
- yxhuvud 6y agoRecursion is really not the idiomatic way to solve most things in Crystal either, not that it make the test relevant.