adding benchmark to extractor#1
Conversation
|
@the-moisrex The problem might be algorithmic. The extractor follows this algorithm:
In some instances, this is fine. However, look how the reference ondemand code is like in the two instances that I have identified. We do...
And so on. When the code is written to match the order of the keys in the JSON... this second approach is going to be more efficient than the extractor code. |
|
So, possibly, we could use a hint parameter to choose the algorithm you want to use. If you think you know the order of the keys, you could use one algorithm, otherwise you could use another... ??? |
@lemire that was the idea from which I optimized
I don't think a hint is a good idea. Is there a scenario that the current algorithm would perform better? |
|
I'm gonna merge this. |
|
@the-moisrex Conceptually, there might be different algorithms that are best. But I agree that your latest design is quite good and likely difficult to improve upon. |
This is a PR on top of the extractor PR at simdjson#2247
Preliminary benchmark suggests a small performance loss... The difference is small, but I observe it in two different benchmarks.
Can you check what you get?
partial_tweets
kostya