▲ | wslh 18 hours ago | ||||||||||||||||
As a casual Swift desktop developer, I also wonder about how practical and fast Swift is, especially when compared to scripting languages like Python. For instance, last week, I was working on bit manipulation and realized that Swift has methods to count 1 and 0 bits: let value: UInt8 = 0b11010101 let count = value.nonzeroBitCount | |||||||||||||||||
▲ | deze333 18 hours ago | parent | next [-] | ||||||||||||||||
It's fast enough to make running an app feel like running a native app – faster start time, less memory used, less power hungry, more responsive UI – compared to browser based cross-platform apps. One can say it achieves maximum user interaction speed. For most critical calculations, one can easily integrate C++/C libraries – at the source code level – which Swift can compile, link and call directly. Or drop down to unsafe features of Swift and achieve speeds comparable to C++. But that's not really needed in most of real life use cases. Convenience is what really matters when it comes to Swift. | |||||||||||||||||
| |||||||||||||||||
▲ | spencerflem 16 hours ago | parent | prev [-] | ||||||||||||||||
What's wrong with that? This is often a single CPU instruction and a lot of languages have support for it, including python | |||||||||||||||||
|