5 ms·
Author did not say if he compiled with compiler optimizations, which appear to be very important for swift being "swift".[1] [1] https://twitter.com/Catfish_Ma
by cowsandmilk 12y ago
Author did not say if he compiled with compiler optimizations, which appear to be very important for swift being "swift".[1]
[1] https://twitter.com/Catfish_Man/status/473752917347139584 https://twitter.com/Catfish_Man/status/473752917347139584
- mpweiher 12y agoI made similar tests with optimization and saw similar numbers. Without optimization it was significantly worse.
- electic 12y agoSame here. There seems to be a stiff price to pay for all that convenience...
- solarexplorer 12y agoI don't get it. "Similar numbers" but "significantly worse"? You measure performance and compile without optimization?! If you have better numbers, please share them!
- dragonwriter 12y ago> I don't get it. "Similar numbers" but "significantly worse"? GP said with optimization he got similar numbers, and without optimization he got significantly worse numbers. It was crystal clear. > You measure performance and compile without optimization?! GP clearly stated he compiled both with and without optimization, and characterized (qualitatively) the results of each compared to the results in the article.
- mpweiher 12y ago> "Similar numbers" but "significantly worse"? Yes. Similar numbers to the ones posted when compiling with optimization. Significantly worse when compiling without optimization. > You measure performance and compile without optimization?! No, I tend to measure with optimization. In fact, I personally don't do Debug builds at the all. However, when the numbers were so bad, I did a Debug build to cross check, and lo and behold, those numbers were even worse. That clear things up?
- solarexplorer 12y agoYep. Thank you.
- itistoday2 12y ago@milend via twitter: "He's definitely running the Swift code in Debug mode as I saw numbers in the same ballpark." [1] https://gist.github.com/anonymous/4df3610970891c6afc5a https://gist.github.com/anonymous/7d7fcf0a5ce24c37999c ObjC: 0.063209, Swift: 0.255287 (Release) ObjC: 0.060600 Swift: 5.200207 (Debug)" [2] [1] https://twitter.com/milend/status/474349620311883776 [2] https://twitter.com/milend/status/474354899527155712
- deleted 12y ago[deleted]
- milen 12y agoI did some further investigation [1] by running 20 million iterations in Release and profiled the code. Turns out, at least 82.9% of it was just swift_retain / swift_release (ref counting). Whether those retains / released can be optimised away, I don't know, we'll have to wait and see. [1] https://twitter.com/milend/status/474360984413683713 https://twitter.com/milend/status/474360984413683713