Hacker News new | past | comments | ask | show | jobs | submit login

Swift is slower in the debug mode and faster with full optimizations. I don't know either language, but I think NSArray cannot store primitive types, so he used NSNumber object wrapper.



Thats correct, you need wrap the primitive types when putting them in an array. Unless you use a C style array, but thats more hassle than it's worth generally.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: