Skip to content

Speed up HashMap by avoiding invokeinterface on hot paths #389

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

Closed
retronym opened this issue May 19, 2017 · 4 comments
Closed

Speed up HashMap by avoiding invokeinterface on hot paths #389

retronym opened this issue May 19, 2017 · 4 comments

Comments

@retronym
Copy link
Member

retronym commented May 19, 2017

Consider copy/paste inheritance of HashTable.{improve,index,findOrAddEntry,addEntry0,findEntry) from trait HashTable into class HashMap to avoid invokeinterface.

I noticed these are reported heavily in the profiler as callers of itable stubs. See https://wiki.openjdk.java.net/display/HotSpot/InterfaceCalls

image

@retronym
Copy link
Member Author

/cc @paplorinc

@retronym retronym mentioned this issue May 19, 2017
7 tasks
@fwbrasil
Copy link

fwbrasil commented Oct 8, 2018

@retronym would you mind sharing which tool you used to generate the image on the ticket description? I'm debugging a difference in the rate of itable stub calls in Scala 2.11 and 2.12

@retronym
Copy link
Member Author

retronym commented Oct 8, 2018 via email

@dwijnand
Copy link
Member

Probably not relevant anymore after scala/scala#7348.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants