-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve Performance #7
Comments
Note that I have also take the brute force approach for now and make most of values strict. Here is the memory profile:
|
Remove the lines |
Thanks, @soupi . I see a lot of improvement. But, it is still slower that what you would like. Here are the numbers:
|
Update: I |
Where is the java code you are comparing against? |
The java code is gradually built up in each chapter. You are probably looking for this code: |
Currently, the Interpreter is too slow compared to the speed of the corresponding Java interpreter as listed here:
https://craftinginterpreters.com/chunks-of-bytecode.html. The Java version takes around 72 seconds,
But, the current Haskell version takes a lot longer. Some details follow:
Here is the corresponding
lox
code:t1.lox
You see that the Haskell version takes much longer.
Here are some performance stats that I collected so far for n=35.
Here is the entire listing of the profile. As expected, the
interpreter
is the highest cost center. I feel like I could some how reduce the cost of some operations I am doing whileapplyCompOpToDouble
orlookupEnv
orinsertEnv
. I believe the too much cycles are spent creating new versions of theMap
.scanner-exe-1.prof.txt
The text was updated successfully, but these errors were encountered: