[Cuis-dev] allSubclasses and withAllSubclasses improvement

Hernan Wilkinson hernan.wilkinson at 10pines.com
Wed Aug 21 05:26:42 PDT 2019


Hi,
 attached is a cs that changes the implementation of #allSubclasses and
#withAllSubclasses and generates performance improvement drastically.

 Just as a quick example, with the current implementation:
 Time millisecondsToRun: [ 100 timesRepeat: [Behavior withAllSubclasses ]]
1140 .

 With the proposed change:
 Time millisecondsToRun: [ 100 timesRepeat: [Behavior withAllSubclasses2 ]]
 . 73

 In the type checker of LiveTyping, checking Behavior goes from 9.5 seconds
to 5 seconds only with that change.

 One difference between the current and proposed version, is that the
current returns a Set while the proposed version returns an
OrderedCollection.
 I looked carefully if that could break something and it does not. I've
been using the image with this new implementation and everything works fine.

 Juan, please take a look at it and integrate it if you think it is useful.
 Hernan.

-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190821/3ff15486/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3845-allSubclassesImprovement-HernanWilkinson-2019Aug20-19h44m-HAW.1.cs.st
Type: application/octet-stream
Size: 990 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190821/3ff15486/attachment.obj>


More information about the Cuis-dev mailing list