[squeak-dev] Re: The defaullt implementation of isEmpty might do
too much work
Bert Freudenberg
bert at freudenbergs.de
Thu Oct 27 12:00:59 UTC 2016
On Thu, Oct 27, 2016 at 12:51 AM, Chris Muller <asqueaker at gmail.com> wrote:
>
> In exchange for these blemishes, how many classes actually got benefit
> from inheriting the new implementation?
>
| b |
b := (1 to: 10000) asBag.
[b isEmpty] bench
before: : '5,540 per second. 181 microseconds per run.'
now: '167,000 per second. 6 microseconds per run.'
In my book that's a speedup worth having.
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/b4c891e3/attachment.htm
More information about the Squeak-dev
mailing list
|