Re:Performance comparison: counting words in Python, C/C++, ...
by machinekob on Sunday July 24, 2022 @01:11PM
(#32215476)
Swift is in the same or better performance bracket then C#/Java and unsafe usage can be close to performance of C (maybe 1.3-2x slower). I'm not sure about ranting for poor single test results :P
[ Parent
| on HN ]
Re:Performance comparison: counting words in Python, C/C++, ...
by guenthert on Sunday July 24, 2022 @02:37PM
(#32216312)
No need for hand-waving, there are publicly available benchmark results: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
It's not the only benchmark in town and it needs to be taken with a grain of salt, but so does every benchmark.
Re:Performance comparison: counting words in Python, C/C++, ...
by gernb on Sunday July 24, 2022 @01:25PM
(#32215622)
Latner himself (creator of Swift) said Swift had speed issues because of ARC that they were hoping to solve with better code analysis. Did they?
Re:Performance comparison: counting words in Python, C/C++, ...
by georgelyon on Sunday July 24, 2022 @01:42PM
(#32215782)
They have been improving this steadily (I would argue it is rarely an issue nowadays, and there have always been simple workarounds), but there’s no reason a solution to the problem mentioned in the article should need to use ARC, and should use structs/protocols instead (which don’t use reference counting). I’ve seen a lot of Benchmarks that rate Swift poorly because of this.
Re:Performance comparison: counting words in Python, C/C++, ...
by metaltyphoon on Sunday July 24, 2022 @04:57PM
(#32217624)
The optimized version of C# is not really optimized as there are things left in the table that could be much close to C++.