simdjson / simdjson-java

A Java version of simdjson, a high-performance JSON parser utilizing SIMD instructions
Apache License 2.0
266 stars 21 forks source link

Reduce size of buffer, stringBuffer and tape. #42

Open ZhaiMo15 opened 5 months ago

ZhaiMo15 commented 5 months ago

In class JsonValue, the default size of buffer and stringBuffer, as well as long[] tape in class Tape, is 34M. But in practice it's not necessary. This patch reduce the size of them from 34M to its actual size.

ZhaiMo15 commented 5 months ago

I believe in future, the JsonValue might be deep copied, thus the size of byte[] and long[] is important.