[Pharo-project] IDE speedup
Hello, While working on hashing, I wrote this bit of new code to speed up some of the tools. I hope I didn't make a mistake... it seems to me it should work fine. Enjoy! Andres.
Great. I included your changes in OB. It doesn't seem to break any tests. Lukas 2009/11/2 Andres Valloud <avalloud@smalltalk.comcastbiz.net>:
Hello,
While working on hashing, I wrote this bit of new code to speed up some of the tools. Â I hope I didn't make a mistake... it seems to me it should work fine.
Enjoy! Andres.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli http://www.lukas-renggli.ch
Wonderful --- happy to help! Lukas Renggli wrote:
Great. I included your changes in OB. It doesn't seem to break any tests.
Lukas
2009/11/2 Andres Valloud <avalloud@smalltalk.comcastbiz.net>:
Hello,
While working on hashing, I wrote this bit of new code to speed up some of the tools. I hope I didn't make a mistake... it seems to me it should work fine.
Enjoy! Andres.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
tx we love speed :) Stef On Nov 2, 2009, at 5:28 AM, Andres Valloud wrote:
Hello,
While working on hashing, I wrote this bit of new code to speed up some of the tools. I hope I didn't make a mistake... it seems to me it should work fine.
Enjoy! Andres. 'From Pharo1.0rc1 of 19 October 2009 [Latest update: #10491] on 1 November 2009 at 4:30:53 pm'! "Change Set: OBRescueFilter-Speedup Date: 1 November 2009 Author: SqR
Avoid linear search in OBRescueFilter>>cache:for: and O2RescueFilter>>cache:for:. The speedup is most noticeable when e.g.: checking senders of #closeTo: and selecting something like CompiledMethod>>="!
!O2RescueFilter methodsFor: 'filtering' stamp: 'SqR 11/1/2009 16:30'! cache: aCollection for: aNode | cached missing inclusionSet | cached _ cache at: aNode ifAbsent: [^ self initCache: aCollection for: aNode]. cache at: aNode put: aCollection. missing _ rescued at: aNode ifAbsent: [Set new]. inclusionSet := aCollection asSet. missing removeAllSuchThat: [:ea | inclusionSet includes: ea]. cached do: [:ea | (inclusionSet includes: ea) ifFalse: [missing add: ea]]. missing isEmpty ifFalse: [rescued at: aNode put: missing]. ^ missing asArray! !
!OBRescueFilter methodsFor: 'filtering' stamp: 'SqR 11/1/2009 16:27'! cache: aCollection for: aNode | cached missing inclusionSet | cached := cache at: aNode ifAbsent: [ ^ self initCache: aCollection for: aNode ]. cache at: aNode put: aCollection. missing := rescued at: aNode ifAbsent: [ Set new ]. inclusionSet := aCollection asSet. missing removeAllSuchThat: [ :ea | inclusionSet includes: ea ]. cached do: [ :ea | (inclusionSet includes: ea) ifFalse: [ missing add: ea ] ]. missing isEmpty ifFalse: [ rescued at: aNode put: missing ]. ^ missing asArray! !
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Andres Valloud -
Lukas Renggli -
Stéphane Ducasse