phretaddin / schemapack

Create a schema object to encode/decode your JSON in to a compact byte buffer with no overhead.
MIT License
452 stars 33 forks source link

More realistic benchmarks are "needed" #2

Closed castarco closed 8 years ago

castarco commented 8 years ago

If performance claims are made, I think it's important to contribute strong proofs over that statements.

I know that the "benchmarks" are inside the repository, but this is far from being OK:

castarco commented 8 years ago

I haven't many time to contribute, but I'll try to help the project in order to improve its development & testing methodology , maybe with one or two merge requests.

phretaddin commented 8 years ago

Sure, that would be greatly appreciated! I'm still new to the node scene so I'm still learning all these best practices. As for array length, the library is very efficient with large arrays, at least compared to other libraries I tested (avsc, protobuf,msgpack).

For some insight in to how the serialization/deserialization works and performs/scales, you can analyze the contents of strEncodeFunction and strDecodeFunction right before they're returned from getCompiledSchema. Remove the quote marks and run it through jsbeautifier and you can see the exact code that is called to encode/decode the passed in objects/buffers.

phretaddin commented 8 years ago