On Mon, Aug 22, 2011 at 5:06 AM, Dimitrios Apostolou <ji...@gmx.net> wrote: > Hello again, > > most of this patch was posted at the beginning of my GSOC adventure and > primarily is about replacing fprintf() calls with custom faster ones. From > that time I changed minor things you suggested, omitted some complexities > that offered minor speed-up, and made the code as clear as possible, while > following more closely coding guidelines. > > Bootstrapped and tested on both i386 and x86_64, showing runtime improvement > when compiling with debug info enabled. > > The only thing I am not sure is the differentiation between HOST_WIDE_INT > and long, so I provided two versions of the same function. Please let me > know if I should handle this differently. > > > Future speedup in assembly generation *is possible* but requires more > intrusive changes, maybe making assembly hard to read by human: > * Always use hex numbers, they are much faster to produce > * Call GNU assembler with -s parameter, though it's pretty hard to be > compliant. > * Even further in the future we could generate binary data, if we *know* the > assembler is GAS.
+ do \ + { \ + (LABEL)[__i] = (PREFIX)[__j]; \ + __i++; __j++; \ + } \ + while ((PREFIX)[__j] != '\0'); \ Can't you use strcpy(&((LABEL)[2]), PREFIX) here or even better stpcpy ? Thanks, Andrew Pinski