wavedrom / vcd

Value Change Dump (VCD) parser
MIT License
36 stars 9 forks source link

[WASM] fast way of converting to BigInt #24

Open drom opened 4 years ago

drom commented 4 years ago

Find a faster way of transferring bigInt from WASM to JS.

https://github.com/wavedrom/vcd/blob/6ae6413d0fd2ed066a6fc4a5bb9385fcea8eaa65/lib/wrapper.js#L13

esromneb commented 4 years ago

I'm not sure that there is a faster way. Maybe we could return a function so the user only converts into bigint if they want to. Or maybe we have a mask if the desired bits are less than 32 we just use a normal int?