Someone with some C++ regex experience can chop a LOT of time from that thing. I have mostly done Perl and Lua regexes.
@hippy, in your example you are looping line-by-line, so you are thinking the same way as I am. Assuming it is processing the result from clang or gcc I am assuming one inst per line. But here (line 5661):
it looks like the entire file is loaded. And in the loop here (line 5675):
If the above involves memory copy, then performance is dead. For example, say if there is a match at position 10K and the file size is 1000KB, then that line would copy a suffix of 990KB. If it were just pointing here and there things would be fast... but does that look like pointer stuff? I'm not fluent enough in C++ to tell, that's why I stick to coding Pico in C
. It's hard to be fluent in multiple programming languages.
Assuming instructions are one per line, line-by-line processing will give us a big performance win.
@hippy, in your example you are looping line-by-line, so you are thinking the same way as I am. Assuming it is processing the result from clang or gcc I am assuming one inst per line. But here (line 5661):
Code:
auto contents = buffer.str();
Code:
contents = sm.suffix();

Assuming instructions are one per line, line-by-line processing will give us a big performance win.
Statistics: Posted by katak255 — Mon Oct 28, 2024 2:02 pm