Closed thephoenixofthevoid closed 3 years ago
awesome work! Is this good to land?
Second test:
$ git checkout upstream/master
$ node benchmarks/parseshortmap.js
time 1914
decode/s 522466.039707419
$ git checkout decoder-refactoring-2021
$ node benchmarks/parseshortmap.js
time 1813
decode/s 551571.9801434088
I am thinking about more changes, but we may land this one, because it's self-contained.
For example, we may use options as a context (by assigning decodingTypes
and decode
on it), and pass options
object to each function.
It looks like tests do not cover very well decoding arrays. It missed the bug with object inside of array (that this commit introduced due to trivial mistake). Now will be fix.
It looks like tests do not cover very well decoding arrays. It missed the bug with object inside of array (that this commit introduced due to trivial mistake). Now will be fix.
Can you add a test for this regression?
Is it good to go?
It's ready to merge, I double-checked everything today, nothing should go wrong (the regression was trivial and quite surprising to see all tests green).
PS: looks like we need to invest some time into tests to make it more reliable --- maybe, structurize them a bit?
I don't have much time to spend on this lib, but it you want to invest some time to improve it I'll be happy to add you to the repo.
Recreated pull request I didn't figure out the problem, just nuked everything and built again
These changes improved performance. According to bench:
That is 10% improvement.