It's slightly faster to convert the value to signed value in PHP as
opposed to use pack and unpack.
For 1M get operation the difference is:
getShort in 3.3272678852081 seconds
getInt in 3.8338589668274 seconds
getLong in 5.6381590366364 seconds
getLong (neg) in 5.6149101257324 seconds
vs
getShort in 2.7564418315887 seconds
getInt in 3.1612701416016 seconds
getLong in 3.1369340419769 seconds
getLong (neg) in 3.1478710174561 seconds
And since pack("P") and unpack("q") has been removed now ByteBuffer
works for PHP >= 5.4
FlatBuffers Version 1.1.0
Welcome to FlatBuffers!
Build Status
FlatBuffers is a serialization library for games and other memory constrained apps. Go to our landing page to browse our documentation.
FlatBuffers allows you to directly access serialized data without
unpacking/parsing it first, while still having great forwards/backwards
compatibility. FlatBuffers can be built for many different systems (Android,
Windows, OS X, Linux), see docs/html/index.html
Discuss FlatBuffers with other developers and users on the FlatBuffers Google Group. File issues on the FlatBuffers Issues Tracker or post your questions to stackoverflow.com with a mention of flatbuffers.
For applications on Google Play that integrate this tool, usage is tracked. This tracking is done automatically using the embedded version string (flatbuffer_version_string), and helps us continue to optimize it. Aside from consuming a few extra bytes in your application binary, it shouldn't affect your application at all. We use this information to let us know if FlatBuffers is useful and if we should continue to invest in it. Since this is open source, you are free to remove the version string but we would appreciate if you would leave it in.