I coded a simple JSON wrapper on top of boost property trees (available at github).

The focus of the library is to mimic interface of org.json (java JSON library). However it is taking 2 seconds to insert a string array of 1000000 (1M) elements.

For comparison the same code in java, using org.json, takes only 0.071 seconds. One interesting thing that I saw was that the java code used all my cores while my c++ code only uses one core.

Is there a way to optimize this? Does boost have a multi-thread property tree?

有帮助吗?

解决方案

Since i was unable to find any method to improve Boost property tree performance I started developing a Cpp native library. It was the same interface, but faster, and more compliant with the JSON format. The code is publicly available here.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top