3 ms·
Reading https://github.com/niklas-heer/speed-comparison/blob/master/src/leibniz.swift https://github.com/niklas-heer/speed-comparison/blob/master/..., I think t
by Someone 10mo ago
Reading https://github.com/niklas-heer/speed-comparison/blob/master/src/leibniz.swift https://github.com/niklas-heer/speed-comparison/blob/master/..., I think the only overflow checks could be in
for i in 2...rounds+2
and I would hope/expect the compiler to be smart enough to know that it only has to check “rounds+2” once there. Swift isn’t exactly new anymore, and it’s supported by a large company.
What do I overlook?
- pizlonator 10mo agoThere’s no way overflow checks are responsible for that enormous speed difference from C
- deleted 10mo ago[deleted]