-
Notifications
You must be signed in to change notification settings - Fork 60
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
Switch to ProtoDefc #45
Conversation
(TODO for me, format the code using standard and fix the |
Can't you remove the compile step from the benchmark ? |
If it is really slower there is little benefit... |
But unless it's compiling wrong, it should not be slower. |
Numbers don't seem to do this pull request any justice, so I will be posting two comparing videos that use |
|
||
skylightsAddition = skyLightSent ? value.skyLight : Buffer.alloc(skyLightSize) | ||
skylightsAddition = skyLightSent ? value.sky_light : Buffer.alloc(skyLightSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snake_case is wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProtoDef compiler enforces it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should transform the names to camelCase then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright ProtoDef-io/protodefc#22
@@ -38,7 +38,6 @@ | |||
}, | |||
"dependencies": { | |||
"prismarine-block": "^1.0.0", | |||
"protodef": "^1.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well ok but shouldn't you add a dep to protodefc ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not published we need my ProtoDefc stuff merged and my node-protodefc stuff merged. Use npm link.
new version of prismarine-chunk doesn't use protodef |
This is an experimental pull request for prismarine-chunk that switches from ProtoDef to ProtoDefc. This pull request is not close to ready, it requires many things to be done first, most of which are documented here: ProtoDef-io/node-protodefc#7
As well, this means that this repository will only work for Node version >= 8.3 (which I have been assured is not an issue)
So, for some numbers:
Yes. Your eyes are not deceiving you. ProtoDefc is slower, and I have tested it over 20 times. However, it is easily explained: ProtoDefc JIT compiles the protocol during the program execution. This certainly has a 1000+ms overhead. I predict that if this overhead is removed and ProtoDefc is 'warmed up', it will perform noticeably better on softwares like flying-squid. What's left: