Re: [Cake] RFC: allocate without the gotos

2017-11-26 Thread Dave Taht
Kevin Darbyshire-Bryant writes: >> On 26 Nov 2017, at 10:00, Jonathan Morton wrote: >> >> On a purely theoretical basis, it probably isn't as fast, because now the >> 'found' condition has to be tested multiple times on the fast and slow paths >> alike. Only if the compiler is smart enough to

Re: [Cake] RFC: allocate without the gotos

2017-11-26 Thread Kevin Darbyshire-Bryant
> On 26 Nov 2017, at 10:00, Jonathan Morton wrote: > > On a purely theoretical basis, it probably isn't as fast, because now the > 'found' condition has to be tested multiple times on the fast and slow paths > alike. Only if the compiler is smart enough to transform it back the way it > was

Re: [Cake] RFC: allocate without the gotos

2017-11-26 Thread Jonathan Morton
On a purely theoretical basis, it probably isn't as fast, because now the 'found' condition has to be tested multiple times on the fast and slow paths alike. Only if the compiler is smart enough to transform it back the way it was... ...and IMHO the goto version is easier to read too. - Jonathan