miloyip / nativejson-benchmark

C/C++ JSON parser/generator benchmark
MIT License
1.97k stars 262 forks source link

V8's size is misleading #88

Open dead-claudia opened 7 years ago

dead-claudia commented 7 years ago

The reported size is of the entire engine, not just the JSON parsing code. It might be better to do one of these two options:

  1. Report the size only for these four files: json-parser.cc, json-parser.h, json-stringifier.cc, and json-stringifier.h.
  2. Just report it as an outlier aside from the size chart, since the parser/stringifier is for an API required by the ECMAScript standard (and thus a size might be misleading), and it wasn't made for typical direct use from C++.
miloyip commented 7 years ago

The code size is the size of executable, not source code. Some big libraries have fewer dependencies so the linked size can be smaller.

This dimension is useful for some people that are looking for tight budget on code size, for example, embedded systems.

dead-claudia commented 7 years ago

Oh okay. But still, V8's size is misleading for what it is (it's a full on JS engine, and it makes the other libraries' sizes seem microscopic in comparison).

That's what I was referring to, and why I filed the issue.

miloyip commented 7 years ago

I agree that they are not the same type of libraries. The test suite also includes QT which is a complete application framework. However, I think the chart is not very useful now, due to compressing those need to be compared. I will consider better presentation of data, and/or adding some notes.