-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
dump() performance degradation in v2 #272
Copy link
Copy link
Closed
Description
(This should maybe go into #202?)
Testing a switch from v1.1 -> v2.0 I found fairly significant performance degradation in dump() with a large set of doubles. Here's a sample implementation:
json data;
std::vector< double > vec(5e5);
srand(1);
for( int i = 0; i< 5e5; i++ ){ vec[i] = rand();}
data = vec;
std::string str = data.dump();
compiled with vs2015 on windows. Using v1.1 the dump call takes ~550ms. With 2.0 it takes ~25000ms (50x). I haven't tested on any other platforms (although I can do that if it's helpful).
Granted this is an edge case, but it's a pretty dramatic change.
Reactions are currently unavailable