On Mon, 27 Apr 2009 15:15:46 +0200 Albin Tonnerre <albin.tonne...@gmail.com>
said:

> On Mon, Apr 27, 2009 at 09:18:39AM -0300, Gustavo Sverzut Barbieri wrote :
> > Sachiel is right, List2 is the same as Inlist, lists where the data is
> > the node, you avoid a bit of memory fragmentation.
> 
> Eina_List can use the eina mempool, why Inlist can't, so I wouldn't say using
> Inlists reduce memory fragmentation.

well memory pools are not necessarily un-fragmented themselves. what inlist
avoids is 1 allocation instead of 2. and thats  less malloc to do and half the
allocated memory segments :)

> > and also another
> > pointer redirection (->data).
> 
> That's the argument for using inlists in the kernel. I'm not sure how this
> applies to ecore.

depends on the item. where used generally its a good idea.

> > They're better suited for elements that
> > are always in a list (ie: Evas_Object always in evas), but you can
> > still have them in other Eina_List (not inlist!) if you wish.
> 
> > The downside, at least at the moment, is that you don't have fast
> > "count" operation, it need to walk the whole list in order to figure
> > out how many elements exists.
> 
> > But you can append fast (O(1)) since it
> > will keep a pointer to last element.
> 
> Eina_List too.
> 
> Anyway, TBH I only did it this way because cedric advised me to do so. I'll
> change it to Eina_Inlists if you think that really would have a benefit,
> which I doubt.

yes! please use inlists! :)

> Regards,
> -- 
> Albin Tonnerre
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to