<HTML>
<HEAD>
<TITLE>Re: [PATCH] speed up tokenize_command</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>You’re compiling with –02 and all the changes you made look like the kind of optimizations that –03 will do for you automatically only better (since –O3 will do the right thing across platforms). Can you verify that you’re actually measure a speedup with –O3?<BR>
<BR>
On 4/12/07 4:57 PM, "Paolo Borelli" <paolo.borelli@gmail.com> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'>Hi, thanks for integrating the previous patches so fast!<BR>
<BR>
It made me want to stare a bit at the code to look for any other little<BR>
improvements to make. I stumbled on tokenize_command() and for fun I<BR>
tried to write a faster version (no idea if it is a real bottleneck).<BR>
<BR>
Attached there is my version and the small bench I used: on my machine<BR>
the function is about 20% faster. The nice thing is that the function is<BR>
even shorter and cleaner :)<BR>
<BR>
I tested it a bit to see if my function handled all the cases in the<BR>
same way as the old one and it seems ok, but keep in mind that it has<BR>
not been tested in production...<BR>
<BR>
<BR>
ciao<BR>
Paolo<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'><BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>