You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out borc makes a new Decoder() (which does some kind of very heavy initialisation) on every call to borc.decodeFirst(). So perhaps cache the instance of Decoder instead of making a new one each time.
When using a shared decoder, performance is more reasonable (1000x100 iterations):
So the real fix here, is to update the documentation, the caching of the instance should be the job of the user, as they will know much better what to do with hit.
On 23. Aug 2018, 18:28 +0200, Alex Gordon ***@***.***>, wrote:
A bug is still a bug whether documented or not. ¯_(ツ)_/¯
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
I benchmarked borc against msgpack-lite and JSON for arrays of medium-sized integers (my intended use-case).
Encode performance is within the same order of magnitude, but decode performance is wild (10x100 iterations):
It turns out borc makes a
new Decoder()
(which does some kind of very heavy initialisation) on every call toborc.decodeFirst()
. So perhaps cache the instance ofDecoder
instead of making a new one each time.When using a shared decoder, performance is more reasonable (1000x100 iterations):
The text was updated successfully, but these errors were encountered: