Re: [Pharo-dev] Set internal array size

2016-12-12 Thread Marcus Denker
> On 12 Dec 2016, at 14:32, Sven Van Caekenberghe wrote: > > >> On 12 Dec 2016, at 18:29, Marcus Denker wrote: >> >> >>> On 1 Dec 2016, at 11:41, Christophe Demarey >>> wrote: >>> >>> Le 1 déc. 2016 à 15:04, Marcus

Re: [Pharo-dev] Set internal array size

2016-12-12 Thread Sven Van Caekenberghe
> On 12 Dec 2016, at 18:29, Marcus Denker wrote: > > >> On 1 Dec 2016, at 11:41, Christophe Demarey >> wrote: >> >> >>> Le 1 déc. 2016 à 15:04, Marcus Denker a écrit : >>> >>> The idea that a set is always

Re: [Pharo-dev] Set internal array size

2016-12-12 Thread Marcus Denker
> On 1 Dec 2016, at 11:41, Christophe Demarey > wrote: > > >> Le 1 déc. 2016 à 15:04, Marcus Denker a écrit : >> >> The idea that a set is always created with a minimal size is because we >> always add at least some elements > > not

Re: [Pharo-dev] Set internal array size

2016-12-01 Thread Henrik Nergaard
ber 1, 2016 3:42 PM To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: Re: [Pharo-dev] Set internal array size > Le 1 déc. 2016 à 15:04, Marcus Denker <marcus.den...@inria.fr> a écrit : > > The idea that a set is always created with a minimal size is because we &

Re: [Pharo-dev] Set internal array size

2016-12-01 Thread Christophe Demarey
> Le 1 déc. 2016 à 15:04, Marcus Denker a écrit : > > The idea that a set is always created with a minimal size is because we > always add at least some elements not always. You know in some cases 80% of the time, your instances will have an empty Set and with some

Re: [Pharo-dev] Set internal array size

2016-12-01 Thread Marcus Denker
>> [ fullLoadSet includes: 8; includes: Morph ] bench. "'215.157 per second'" >> >> >> Best regards, >> Henrik >> >> >> From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org >> <mailto:pharo-dev-boun...@lists.pha

Re: [Pharo-dev] Set internal array size

2016-12-01 Thread Christophe Demarey
second'" > > > Best regards, > Henrik > > > From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] On Behalf Of > Christophe Demarey > Sent: Thursday, December 1, 2016 11:49 AM > To: Pharo Development List <pharo-dev@lists.pharo.org> > Subject: [Phar

Re: [Pharo-dev] Set internal array size

2016-12-01 Thread Sven Van Caekenberghe
Of > Christophe Demarey > Sent: Thursday, December 1, 2016 11:49 AM > To: Pharo Development List <pharo-dev@lists.pharo.org> > Subject: [Pharo-dev] Set internal array size > > Hi, > > I just discovered a funny thing. > If you create a Set with Set new, you wi

Re: [Pharo-dev] Set internal array size

2016-12-01 Thread Henrik Nergaard
Christophe Demarey Sent: Thursday, December 1, 2016 11:49 AM To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: [Pharo-dev] Set internal array size Hi, I just discovered a funny thing. If you create a Set with Set new, you will get a Set with an internal array of 5 elements (

[Pharo-dev] Set internal array size

2016-12-01 Thread Christophe Demarey
Hi, I just discovered a funny thing. If you create a Set with Set new, you will get a Set with an internal array of 5 elements (hardcoded in Set class>>#new). If you ask explicitly a Set for one or no element: Set new: 0 (or a number between 0 and 5), you will get an internal array of 7