Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slot-speedup-isReferenced #6858

Merged

Conversation

MarcusDenker
Copy link
Member

isReferenced of Slot uses the default implementation which gets all using methods.
But we just need to detect the first one and can stop.

Test is already there (testIsReferenced)

Speedup:

[(Point slotNamed: #x) isReferenced] bench

"'7979.013 per second'"
"'204659.136 per second'"

  • im additon clean up isReferenced implementations a little

…sing methods.

But we just need to detect the first one and can stop.

Test is already there (testIsReferenced)

Speedup:
	
[(Point slotNamed: #x) isReferenced] bench 

"'7979.013 per second'" 
"'204659.136 per second'"

- im additon clean up isReferenced implementations a little
- so that in #isReferenced instead
- speedup ClassVariable>>#isReferenced *a lot* in many cases by checking class side first (which has far less methods which in most cases use the class var)
@MarcusDenker MarcusDenker reopened this Jul 16, 2020
@MarcusDenker MarcusDenker merged commit 78210fc into pharo-project:Pharo9.0 Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants