4 ms·
It's nice to see that some newer languages like Rust and Swift are performing well!
by mrks_ 9y ago
It's nice to see that some newer languages like Rust and Swift are performing well!
- teamhappy 9y agoWell, Rust and Go are performing very well. Swift performs worse than languages like Java, Haskell, OCaml, C# and Lisp. -- Edit -- My bad, I only looked at the paper. The results (https://sites.google.com/view/energy-efficiency-languages/results https://sites.google.com/view/energy-efficiency-languages/re...) show that Swift and Go are doing about as well as Java. (Which means they're right behind C, C++, Rust and Fortran).
- jws 9y agoThe summary results for Swift do not reflect the individual tests. There is a single anomalous test, reflex-redux, where the Swift implementation sucks badly. Anecdotally, Swift string handling makes it easy to do the right thing when handling Unicode strings, but also makes it easy to burn up several orders of magnitude too much CPU when you use those functions for simple tasks. I once saved three orders of magnitude clock time by dropping to POSIX IO and C run time library string handling for an application that needed to read a text file containing 10000 lines of 81 digits at launch and process them as single digits.
- mrks_ 9y agoThat's true. Given how young Swift is, though, I think it shows that its future is bright.