Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So what should he use instead?


    UnsafeMutablePointer<UInt8>
Which he somehow dismisses but is the corresponding thing to an unsafe C array.

I'm not a big fan of Swift but this rant is rather unfounded. Sometimes you have to give up high level abstraction for performance. In Obj-C he was willing to do so by using an C array. In Swift on the other hand he insists on using the high level array implementation.


Wasn't it still several times slower than ObjC with UnsafeMutablePointer<UInt8>?


The code he is trying to port is to Swift is pure C/C++ ( www.handmadehero.org ) , so probably this solution is the easiest, apart from being the most appropriate.


> UnsafeMutablePointer (which is basically direct C-style memory access)




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

Search: