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

Structs are a welcome improvement. Using Protobuf, I was forced to move from a 3d vector type to an array of doubles to get packed=true performance. Small loss of expressiveness, no big deal, but I can imagine it getting a lot worse for heterogeneous and/or more complex structs. Was a shock to see a dynamic allocation for every vector in my 1000-element array. (I understand why this is necessary given the spec of Protobuf though.)


Yup. An array of Vec3 (3 floats) will just take N*12 bytes, as you expect.




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

Search: