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

:: hashCode #54

Open
mkeskells opened this issue Feb 14, 2018 · 4 comments
Open

:: hashCode #54

mkeskells opened this issue Feb 14, 2018 · 4 comments

Comments

@mkeskells
Copy link
Collaborator

Investigate the high call count

420422	scala.collection.immutable.$colon$colon::hashCode()I
@mkeskells
Copy link
Collaborator Author

it doesnt seems that a list is somthing that should be hashcoded a lot

@cbwl
Copy link

cbwl commented Feb 19, 2018

@rorygraves

@hrhino
Copy link
Collaborator

hrhino commented Jun 6, 2019

@mkeskells it's b/c lists are in types, which are used as hash keys

10893: scala.collection.immutable.$colon$colon.hashCode(List.scala:452) <- scala.runtime.Statics.anyHash(Statics.java:122) <- scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) <- scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) <- scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) <- scala.reflect.internal.Types$PolyType.hashCode(Types.scala:2656)
24338: scala.collection.immutable.$colon$colon.hashCode(List.scala:452) <- scala.runtime.Statics.anyHash(Statics.java:122) <- scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) <- scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) <- scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) <- scala.reflect.internal.Types$ExistentialType.hashCode(Types.scala:2717)
25432: scala.collection.immutable.$colon$colon.hashCode(List.scala:452) <- java.util.WeakHashMap.hash(WeakHashMap.java:298) <- java.util.WeakHashMap.get(WeakHashMap.java:396) <- scala.collection.convert.Wrappers$JMapWrapperLike.get(Wrappers.scala:267) <- scala.collection.convert.Wrappers$JMapWrapperLike.get$(Wrappers.scala:266) <- scala.collection.convert.Wrappers$JMapWrapper.get(Wrappers.scala:303)
27096: scala.collection.immutable.$colon$colon.hashCode(List.scala:452) <- scala.runtime.Statics.anyHash(Statics.java:122) <- scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) <- scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) <- scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) <- scala.reflect.internal.Types$RefinedType.hashCode(Types.scala:1611)
32686: scala.collection.immutable.$colon$colon.hashCode(List.scala:452) <- scala.runtime.Statics.anyHash(Statics.java:122) <- scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) <- scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) <- scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) <- scala.reflect.internal.Types$MethodType.hashCode(Types.scala:2508)
46622: scala.collection.immutable.$colon$colon.hashCode(List.scala:452) <- scala.runtime.Statics.anyHash(Statics.java:122) <- scala.util.hashing.MurmurHash3.productHash(MurmurHash3.scala:68) <- scala.util.hashing.MurmurHash3$.productHash(MurmurHash3.scala:215) <- scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:149) <- scala.reflect.internal.Types$AnnotatedType.hashCode(Types.scala:3429)

@hrhino
Copy link
Collaborator

hrhino commented Jun 6, 2019

a lot of those are because of computeBaseTypeSeqOfCompoundType using a Map[List[Type], WeakReference[Type]]

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

4 participants