On Sat, Jun 20, 2009 at 1:47 AM, Sergey
Semernin<[email protected]> wrote:
> Hello, All.
>
> In message from 20 june 2009 Gustavo Sverzut Barbieri wrote:
>
>> > to be realistic - this will never make a difference. you many gadgets do
>> > you expect to have in a list? 100? 1000? more? you know that if 1 module
>> > provides 1 gadget... you'll run out of fd's long before you have enough
>> > items for this to matter. this is micro-optimisation with no real effect.
>> > :( every list item created will probably do dozens and dozens of
>> > strcmp's. this won't make a dent at all. even if they were all removed
>> > you'd still barely notice. :)
>>
>> But why do a not so good solution when the other solution is actually
>> simpler code-wise? You'd be changing handling of pointers (!NULL) and
>> then a comparison by just comparing two values.
>>
>> Actually, after discussing this Sergey just wisely remembered that we
>> should use simple ENUM/integers and that gets even more simpler. Given
>> the number of things this could grow, I would even say that integers
>> should be powers of 2 and use a mask of accepted types, then no need
>> to do functions and all, just set your mask and be happy.
>
> So, what solution we will come? Should I make it with integer enums?
> And inside is_site callback we can use masks, cases, and etc., what we need in
> concrete module.

if we go with enums using bits/masks we don't even need is_site(),
just apply the mask and see if it's zero or not.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to