-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consider implementing a compiler in js again #86
Comments
Bump The only problem is re-implementing read/write functions and optimization of produced code (can be solved with Closure Compiler, but that's huge overhead). |
Reimplementing what ? |
And not sure what you mean by "bump". |
putting some background in this issue for anyone falling on it :
this is this last point that this issue is about. |
This is interesting. What you suggest is to make a node module that could take a protocol.json with the current specification and generate a .js file that contains an optimized ser/deser code ? You said you tried writting it manually, is there an example (code) of what you did by hand ? Also, what benchmark do you have to test the performance of the compiled vs interpreted protodef ? |
yeah. That js file could then either be saved and committed or simply be evaluated using #65 has some examples but basically the idea of writing manually is just to write naive code to read buffers using https://nodejs.org/api/buffer.html for benchmarks, see https://github.com/ProtoDef-io/node-protodef/pull/65/files#diff-95f0a310f289230d56c3a4949c17963eR85 see also all of this https://github.com/ProtoDef-io/node-protodef/tree/master/benchmark I did not implement manually everything (that would be crazy long !), but on simple examples it's much faster to use manual code. |
now done |
support .json , only objective is performance improvement
The text was updated successfully, but these errors were encountered: