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

Haskell compiler 8.0.x is slow when run from inside Stack on Windows 10 Ubuntu subsystem #1713

Closed
sukhmel opened this issue Feb 20, 2017 · 2 comments

Comments

@sukhmel
Copy link

sukhmel commented Feb 20, 2017

Description

Both GHC and programs compiled with it are slow when version 8.0.x is used.

Expected run time to be roughly the same between 7.6.3, 7.10.3, 8.0.1, and 8.0.2 versions

Windows version is 1607 build 15031.0

Actual results

Newer GHC:

$ time stack ghc -- -e 'putStrLn ""'

real    2m28.240s
user    0m0.375s
sys     3m30.078s

$ time stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.0.2

real    1m45.533s
user    0m0.125s
sys     2m46.516s

$ time stack ghc --compiler ghc-8.0.1 -- --version
The Glorious Glasgow Haskell Compilation System, version 8.0.1

real    2m54.764s
user    0m0.234s
sys     3m58.422s

$ echo 'main = putStrLn "Hello, world!"' > test.hs
$ time stack ghc --compiler ghc-8.0.2 -- test
[1 of 1] Compiling Main             ( test.hs, test.o )
Linking test ...

real    3m56.582s
user    0m0.609s
sys     5m8.125s

$ time ./test
Hello, world!

real    0m27.540s
user    0m0.000s
sys     0m27.297s

Older GHC:

$ time ghc -e 'putStrLn ""'

real    0m0.872s
user    0m0.109s
sys     0m0.125s

$ time ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3

real    0m0.072s
user    0m0.000s
sys     0m0.031s

$ time stack ghc --compiler ghc-7.10.3 -- -e 'putStrLn ""'

real    0m0.876s
user    0m0.234s
sys     0m0.688s

$ time stack ghc --compiler ghc-7.10.3 -- --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

real    0m0.832s
user    0m0.109s
sys     0m0.813s

$ echo 'main = putStrLn "Hello, world!"' > test.hs
$ time stack ghc --compiler ghc-7.10.3 -- test
[1 of 1] Compiling Main             ( test.hs, test.o )
Linking test ...

real    0m2.222s
user    0m0.406s
sys     0m1.406s

$ time ./test
Hello, world!

real    0m0.030s
user    0m0.000s
sys     0m0.031s

Steps to reproduce

  1. run bash
  2. execute following commands:
    1. sudo apt-get install stack
    2. stack setup 7.10.3
    3. stack setup
    4. echo 'main = putStrLn "Hello, world!"' > test.hs
    5. time stack ghc --compiler ghc-8.0.2 -- test
    6. time ./test
    7. time stack ghc --compiler ghc-7.10.3 -- test
    8. time ./test

Required packages and commands to install:

  • Stack

Bug is also filed here

@therealkenc
Copy link
Collaborator

This is #1671.

@benhillis
Copy link
Member

Marking as a duplicate.

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

3 participants