Zhai Mo

Results 14 comments of Zhai Mo

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

> However, the power of schema-based parsing is that we can skip parsing fields that are not included in the schema. For a Map, we would need to go through...

> Why do you need to keep JsonValues between runs of parse? For example, I have a lots of json need to parse. Each json is passed by others which...

Consider the JSON as a tree, the depth I meant is the depth of the node of the tree. For example, ``` // depth 1 { a: 1, b: 2...

And I re-run the benchmarks in a more stable environment, the results are similar. My hardware: And the java version: The benchmarks I ran are in: https://github.com/ZhaiMo15/simdjson-java/tree/performanceTest

> I suggest that you comment out this line and rerun the benchmarks in your environment. We are now on the same page! I rerun the benchmarks with commenting out...

Additionally, consider a real situation instead of benchmark, I believe the classResolver is different when parsing different JSON. So comment out the `classResolver.reset()` can increase the score of benchmark, but...

> Perhaps the cache needs to have a more sophisticated eviction policy (LRU?). Perhaps the cache needs a fixed size(configurable)? Regardless of the eviction policy.

> I have an idea on how to replace reflection with an alternative approach, but it requires more research. Great! Looking forward to it. > I wonder how realistic this...

I get your point. The number of different schemas should not be large. However, ```java T walkDocument(byte[] padded, int len, Class expectedType) { jsonIterator.init(padded, len); classResolver.reset(); ``` I think in...