On 05/31/2016 06:55 PM, Dimitry Sibiryakov wrote: > 31.05.2016 17:34, Alex Peshkoff wrote: >> I hardly believe strings can affect performance seriously. >> They are typically not used for objects in deep layers. > Yes, I doubt that these little things can win more than a couple of > percents, but still > they eat common resources such as CPU or memory throughput. > >> Or may be there are mentioned cases of unintentional behavior? Can you >> provide most striking example? > I compiled only "common", but the biggest surprise for me was > security.cpp:mergeLists() > that creates temporary PathNames for parseList() parameters. It took me some > time to > understand why it does so.
Function is used to merge lists of client and server plugins. I doubt it's worth optimization. > Another surprise was ObjectsArray::pop(). ObjectsArray was designed to not extra-fast but reliably work with complex objects using memory allocation from pools. Certainly pop performs constructor, it can change pool used for an object. >> What about making ctors explicit - this needs definition of non-trivial >> ctor. > I would suggest "anything that does anything besides simple assignments", > that includes > memory allocation, using memcpy(), etc, not talking about obvious cases as, > for example, > TempFile that uses disk I/O. > Looking at your samples I tend to say that the problem raised by you is artificial and just waste of time. Our time, not CPU cycles :) ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel