added TokenList::Stream class to wrap std::istream usage and implemented alternative C I/O version#244
Conversation
|
Still needs the unit tests to be adjusted to test both implementations as well as making it properly selectable in the standalone binary. This can possibly be introduced further by adding buffering to We could also add a |
Sorry, something went wrong.
dff9b46 to
4193e57
Compare
March 10, 2022 09:19
791e5b1 to
1781870
Compare
April 19, 2022 07:40
|
Turns out it's just a bug in my code with |
Sorry, something went wrong.
5fb149d to
1e8ee57
Compare
April 20, 2022 07:21
|
I backed out the test changes and will merge them into #261 so they don't get lost. |
Sorry, something went wrong.
|
Testing with
Testing with
|
Sorry, something went wrong.
bbeb171 to
23217fc
Compare
November 20, 2022 21:37
|
reducing the Ir count by using C I/O sounds good to me. |
Sorry, something went wrong.
…ntation-specific parts into StdIStream
…uses C I/O functions
… interface in reading initial file
…ome barebones documentation
|
I put this into Cppcheck with the current and added |
Sorry, something went wrong.
Reading the file via
std::istreamincludes a considerable overhead caused bystd::istream::sentryand others. Using C I/O instead reduces the "total Ir" usage by about 10%.Testing with-q -Ilib/ -D__GNUC__ lib/valueflow.cpp:Clang 13271,013,439->269,398,283->244,353,123GCC 11->-> ``The intermediate value shows the improvement if we only change the actual input file. The last value if we also do it for all the includes which does not require you to use the new interface function. So we even if you do not change the application which uses this it would still result in a sizable improvement.