Hello, On Wed, Nov 21, 2012 at 7:39 AM, Jérémy Zurcher <jer...@asynk.ch> wrote: > here are 2 patches to speed up eina_share_common_del with minimal costs on > eina_share_common_add side. > > the second might be controversial > > 0001-eina_share_common_del-speed-up.patch > builtin node is never unlinked even if empty, > always is the last of the queue, > so that it can be used to get a pointer to head. > > cost: never unlink or promote builtin node. > benefit: no need to hash and search rbtree to unlink an empty node, > only to remove an empty head.
It seems good, I am just wondering why you did add a 'if (node->next)' in _eina_share_common_head_find. In my opinion, it should never pass the test and trigger that case. > 0002-eina_share_common_del-speed-up.patch > store full hash in Eina_Share_Common_Head, so we only hash once > use 8 lower bits as node hash, use next 8 bits as bucket index. > > cost: have to apply 0xFF mask on hash in rbtree callbacks. > benefit: no need to hash when removing an empty head. Interesting. Did you run the live benchmark ? Applying a 0xFF mask should be fast and not impact speed i think. -- Cedric BAIL ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel