Dan
2007/12/5, Sciss <contact@xxxxxxxx>:
hello,
should we change includesKey in Dictionary and IdentityDictionary to
call 'at', since that is a lot faster? :
x = IdentityDictionary.new;
(1..1000).do({ arg key; x.put( key, \lala )})
{ a = 2000.collect({ arg key; x.includesKey( key )})}.bench;
{ b = 2000.collect({ arg key; x.at( key ).notNil })}.bench;
a == b
x = Dictionary.new;
(1..1000).do({ arg key; x.put( key, \lala )})
{ a = 2000.collect({ arg key; x.includesKey( key )})}.bench;
{ b = 2000.collect({ arg key; x.at( key ).notNil })}.bench;
a == b;
ciao, -sciss-
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel
--
http://www.mcld.co.uk
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel