> On Sun, Dec 16, 2007, Tsantilas Christos wrote: > >> > Have you benchmarked what that'll do to performance? :) >> >> Maybe has some performance penalty. But if there is a performance >> decrease, I do not think that it is huge. >> Normally creating a class is not more costly than creating a C struct >> and initialize it. The AsyncCall classes are very simple classes. > > Well, the previous C comm loop code didn't create a C struct and > initialise it. That was the whole point. :) > >> Moreover, I believe with current design you are loosing more in >> performance, trying to prevent problems adding extra code for tests or >> workarounds. > > I suggest just benchmarking it under high transaction load (ie, > which pegs the CPU 100%) and see where the CPU is going. > You'll see the memory allocator taking up quite a bit of CPU > time. Remove the low-hanging fruit which will be eliminated with > a few easy changes (headersEnd() taking loads of CPU, memcpy(), > memset()) and if its anything like what I saw before you'll see > the allocator taking up more CPU than is fair.. > > Adrian >
Adrian, I've tried to do some profiling myself recently but am stuck getting those nice stats you post out of it. (Last time I did profiling was in VisualStudio). Could you send me or the list a how-to on using the cpu-profiling feature, from enable to viewing stats please? Amos
