5 ms·
This talk proves this point exactly: https://youtu.be/zBkNBP00wJE https://youtu.be/zBkNBP00wJE Watch from 27:00 where he talks about using const wherever poss
by dhsysusbsjsi 6y ago
This talk proves this point exactly:
https://youtu.be/zBkNBP00wJE https://youtu.be/zBkNBP00wJE
Watch from 27:00 where he talks about using const wherever possible so the compiler can optimise. It reduces a full function call to work out a colour in 3D space from thousands of instructions to one.
After watching this and a few others particularly dynamic dispatch in Swift, I find myself adding as many hints as I can and applying the most restrictions / scoping possible. Final, const, Private etc.
https://developer.apple.com/swift/blog/?id=27 https://developer.apple.com/swift/blog/?id=27
Even though actually it can work this out in your module!