Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
flex is much faster?
ollydbg:
I find an even better lexer, it is Lexical Analyzer Generator Quex
I have give it a try and ask the author of quex about the performance, here is his answer:
SourceForge.net: Lexical Analyzer Generator Quex: Topic: Performance question about Quex
See his result compared with flex:
--- Quote ---(*) Results ___________________________________________________________________
Results on "code/linux-2.6.22.17-kernel-dir.c".
(1) lexer-flex:
Compiled with -Os (size optimized) clock_cycles_per_character = {35.004494}, // overhead eliminated
Compiled with -O3 (speed optimized) clock_cycles_per_character = {43.224880}
(2) lexer-quex Compiled with -Os (size optimized) clock_cycles_per_character = {17.738173},
Compiled with -O3 (speed optimized) clock_cycles_per_character = {17.393938}
As you can see, it is also a cache issue--smaller programs perform faster, cause lesser cache misses.
In directory "demo/benchmark/run" you find some helper scripts to run your benchmark.
Note, that the benchmark tries to isolate the cost for lexical analyzis.
An inadvertent use of the std::string class can slow down the performance tremendously.
--- End quote ---
Nice!!
This also give some hints why our DoParse function in CC runs slower, because it use wxString. :D
oBFusCATed:
--- Quote from: ollydbg on August 02, 2010, 07:45:10 am ---This also give some hints why our DoParse function in CC runs slower, because it use wxString. :D
--- End quote ---
The profile just told you this :)
p.s. But keep in mind this: doing optimizations work is worthless if you don't have an automatic regression testing system!
ollydbg:
--- Quote from: oBFusCATed on August 02, 2010, 09:50:44 am ---
--- Quote from: ollydbg on August 02, 2010, 07:45:10 am ---This also give some hints why our DoParse function in CC runs slower, because it use wxString. :D
--- End quote ---
The profile just told you this :)
--- End quote ---
Thanks, but How can you explain the profile result of DoParse() function?? I still can't fully understand the profile result of CC.
--- Quote ---p.s. But keep in mind this: doing optimizations work is worthless if you don't have an automatic regression testing system!
--- End quote ---
That's correct.
oBFusCATed:
--- Quote from: ollydbg on August 02, 2010, 10:20:37 am ---Thanks, but How can you explain the profile result of DoParse() function?? I still can't fully understand the profile result of CC.
--- End quote ---
Looking at the profile we can see many wxString functions.
Do you have the "call graph" (might be name something else) page of the profile?
This page give a bit more info for the flow of the program.
ollydbg:
@obf
thank you very much.
can you help to see the profile result?
I'm sorry I'm not fully understand the result.
See the attachment.
thanks.
BTW: does profile only support single thread? currently, CC use multithread.
change the file to
result.7z.001
result.7z.002
then, unzip them together.
because I can't upload that type of file...
[attachment deleted by admin]
[attachment deleted by admin]
Navigation
[0] Message Index
[*] Previous page
Go to full version