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

dhall-to-cabal performance has regressed #79

Open
ocharles opened this issue Jun 3, 2018 · 8 comments
Open

dhall-to-cabal performance has regressed #79

ocharles opened this issue Jun 3, 2018 · 8 comments

Comments

@ocharles
Copy link
Member

ocharles commented Jun 3, 2018

For 1.0.0.1

$ time ./dist/build/dhall-to-cabal/dhall-to-cabal dhall-to-cabal.dhall

real	0m6.735s
user	0m6.628s
sys	0m0.106s

For 1.1.0.0

$ time ./dist/build/dhall-to-cabal/dhall-to-cabal dhall-to-cabal.dhall

real	0m53.553s
user	0m52.914s
sys	0m0.562s

Ouch! Hopefully @quasicomputational's work on Dhall itself will help fix this.

@ocharles
Copy link
Member Author

ocharles commented Jul 5, 2018

Looking much better in 1.2.0.0

$ time time ./dist-newstyle/build/x86_64-linux/ghc-8.2.2/dhall-to-cabal-1.2.0.0/x/dhall-to-cabal/build/dhall-to-cabal/dhall-to-cabal dhall-to-cabal.dhall

real	0m9.900s
user	0m9.815s
sys	0m0.084s

@ocharles
Copy link
Member Author

ocharles commented Jul 28, 2018

Unfortunately a little slower in 1.3.0.0 (though this might be due to a different machine, can't remember where I last ran this test).

real    0m13.515s
user    0m13.378s
sys     0m0.136s

@ocharles
Copy link
Member Author

Slower again with dhall-1.18.0:

[nix-shell:~/work/dhall-to-cabal]$ time /home/ollie/work/dhall-to-cabal/dist-newstyle/build/x86_64-linux/ghc-8.2.2/dhall-to-cabal-1.4.0.0/x/dhall-to-cabal/build/dhall-to-cabal/dhall-to-cabal dhall-to-cabal.dhall > /dev/null

real    0m14.675s
user    0m14.555s
sys     0m0.116s

@jneira
Copy link
Collaborator

jneira commented Oct 16, 2018

Ugh, it should be faster this time 😞
I did a pair of profiles of dhall < dhall-to-cabal.dhall after the new impl map changes: dhall-lang/dhall-haskell#612 (comment), dhall-lang/dhall-haskell#612 (comment)

@ocharles
Copy link
Member Author

Yep, I was hoping for a change (for the better!) but unfortunately it hasn't come out that way 😢

@jneira
Copy link
Collaborator

jneira commented Nov 26, 2018

I've updated the related dhall-haskell issue with the new resultas using the new union direct access: dhall-lang/dhall-haskell#412 (comment)

dhall-to.cabal has improved a 200%:

  • before direct access:
dhall-to-cabal:           OK (16.17s) 
  • after:
dhall-to-cabal:           OK (5.35s)

@ocharles
Copy link
Member Author

For dhall-to-cabal-1.3.2.0 (Dhall 1.20.1):

[nix-shell:~/work/dhall-to-cabal]$ time ./dist-newstyle/build/x86_64-linux/ghc-8.2.2/dhall-to-cabal-1.3.2.0/x/dhall-to-cabal/build/dhall-to-cabal/dhall-to-cabal dhall-to-cabal.dhall
Writing to dhall-to-cabal.cabal.

real    0m2.886s
user    0m2.838s
sys     0m0.048s

Very nice improvement! CC @Gabriel439

@ocharles
Copy link
Member Author

More progress in dhall-to-cabal-1.3.3.0 using dhall-1.23.0:

[nix-shell:~/work/dhall-to-cabal]$ time /home/ollie/work/dhall-to-cabal/dist-newstyle/build/x86_64-linux/ghc-8.2.2/dhall-to-cabal-1.3.3.0/x/dhall-to-cabal/build/dhall-to-cabal/dhall-to-cabal dhall-to-cabal.dhall 
Writing to dhall-to-cabal.cabal.

real    0m1.927s
user    0m1.874s
sys     0m0.034s

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

No branches or pull requests

2 participants