Hi everybody, I was discussing with Thibault about the performance of some methods defined on sets ( actually quite slow for big collections, mainly union: and intersection: ) and we were wondering if there is any implementation of some BitField-like class to speed up these operations? May be in an external project? Abdelghani
Hello, You maybe can use Integers as bitfield: bitField := 0 bitAt: 200 put: 1. executing bitField bitAt: 200 will return 1. The only thing to take care is that it # bitAt:put does not change the object itself, but instead returns a new one. Marcus
On 16 Nov 2015, at 17:16, abdelghani ALIDRA <alidrandco@yahoo.fr> wrote:
Hi everybody,
I was discussing with Thibault about the performance of some methods defined on sets ( actually quite slow for big collections, mainly union: and intersection: ) and we were wondering if there is any implementation of some BitField-like class to speed up these operations? May be in an external project?
Abdelghani
Have a look at the chapter on number in deep into pharo. You get some illustrations of bit operations for numbers bitShift: bitAnd: ... Stef Le 16/11/15 21:16, abdelghani ALIDRA a écrit :
Hi everybody,
I was discussing with Thibault about the performance of some methods defined on sets ( actually quite slow for big collections, mainly union: and intersection: ) and we were wondering if there is any implementation of some BitField-like class to speed up these operations? May be in an external project?
Abdelghani
participants (3)
-
abdelghani ALIDRA -
Marcus Denker -
stepharo