FastestSmallestTextEncoderDecoder icon indicating copy to clipboard operation
FastestSmallestTextEncoderDecoder copied to clipboard

v8/js engine string cache use age

Open Bnaya opened this issue 4 years ago • 1 comments

Hey Jack!

Thank you again for this amazing library! I'n using parts of the code in https://github.com/Bnaya/objectbuffer

V8 and other js engines are trying to deduplicate strings references, and also hold strings as rope data structure. In my use-case, i'm doing many decoding of the same string over and over again, and i'm not sure how to actual memory in the js engine side gonna end up.

I was wondering if you made any analysis regarding that topic and if you cloud share some findings

Thanks! Bnaya

Bnaya avatar Jun 27 '20 10:06 Bnaya

You raise a good point about a valid concern. I am also interested in knowing how well this library handles strings. However, I do not know how to make an analysis of such data. I'm not that deep in the V8 engine internals. Perhaps you could point me to a article explaining what to do. Thank you.

anonyco avatar Jun 30 '20 21:06 anonyco