Closed WebReflection closed 1 year ago
this is with the current PR:
serialize: 2.750927734375 ms
es.js:2 deserialize: 1.40693359375 ms
this is with the current module as is, without this PR:
serialize: 4.90185546875 ms
es.js:2 deserialize: 3.505126953125 ms
in short, passing huge buffers is roughly twice as fast in here, but as we're speaking ms I am not sure I want to move forward with this idea, but it's OK to have already experimented with it in case I'll change my mind in the future.
This MR tries to address #31 but:
charCodeAt
andTextDecoder.decode
are still needed, it's unclear how much memory or performance boost one can gain by branching logic and bypassing serializationI might just also quick check both times and see if it's substantially faster to do this way, but I think I am going to close this and flag the related issue as won't fix.