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
copyTypeRef in internal.Types promises an optimization but doesn't do it #5206
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5206?orig=1 |
@paulp said: |
@jsalvata said: case TypeRef(`pre`, `sym`, `args`) =>
tp Observations:
I'll now try to measure total run times to decide whether the optimization is worth the cost of the comparison (plan B: make the comparison simpler; plan C: remove the method altogether). |
@jsalvata said: ant clean quick.lib With the optimization in my 10:35pm message: With copyTypeRef(pre,sym,args) just an alias for typeRef(pre,sym,args): With the optimization guarded by "eq" on all three parameters: ... not even measurable difference... ant clean quick.comp: With the optimization guarded by "eq" on all three parameters: With the snippet above: With copyTypeRef just calling typeRef -- and making it final: ... again, not really measurable. I'll try the fix and see what it brings (right now my build is broken :-( ) |
@jsalvata said: [stopwatch] [quick.lib.timer: 3:52.931 sec] Again, not measurable. |
@paulp said: It would be really good if we were collecting regular timings for compiling not-the-compiler things though, as the assessment above is a little inaccessible to everyone but me. |
While working on #5130 I spotted this method:
1.- The first case will never be followed: both Type and Symbol are classes and they don't extend each other, so a Type and a Symbol can ever be "eq" to each other... ¿am I right?
2.- Where is the optimization it promises in the heading comment?
The text was updated successfully, but these errors were encountered: