-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable optimisations in Expr.run
#3830
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
Enable optimisations in Expr.run
#3830
Conversation
Optimizations have a significant impact on compilation time, and not much effect on running time, why should they be enabled by default? |
It should probably be an option of the |
c9a159c
to
c653b1a
Compare
@@ -13,10 +13,9 @@ import java.nio.charset.StandardCharsets | |||
|
|||
class QuoteDriver extends Driver { | |||
|
|||
def run[T](expr: Expr[T]): T = { | |||
def run[T](expr: Expr[T], optimise: Boolean): T = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will work for now, but in the future if you want to be able to pass more options, it might make more sense to pass a Settings
object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add it now to avoid future changes on the API.
168e90e
to
6be81fa
Compare
@smarter this PR needs another review, I added |
@@ -31,6 +31,7 @@ object Runners { | |||
} | |||
|
|||
case class RunSettings( | |||
optimise: Boolean = false | |||
optimise: Boolean = false, | |||
outDir: Option[String] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outputDir, also document the meaning of Some/None here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do java -Djdk.internal.lambda.dumpProxyClasses=out
to be able to debug the classes generated for lambda calls at runtime. Maybe we should have a -Ddotty.meta.dumpClasses
or something for similar purpose.
3dca938
to
873058b
Compare
No description provided.