Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Make the Wire format align data correctly #11

Open
Kangz opened this issue May 2, 2017 · 0 comments
Open

Make the Wire format align data correctly #11

Kangz opened this issue May 2, 2017 · 0 comments

Comments

@Kangz
Copy link
Contributor

Kangz commented May 2, 2017

In the wire format, an NXT command that takes parameters like these (const char* name, uint32_t numIds uint32_t* ids) doesn't have ids aligned (and the wire allocator don't necessarily returned aligned memory either). This is not great for performance in native but would kill performance of a JS-side wire client, that would have to use a DataView type of API. If things are aligned, a JS wire-client could instead use a combo of both a UInt8Array and UInt32Array which get optimized by V8 (and probably other JS engines).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant