Skip to content

Instantly share code, notes, and snippets.

@nomeata
Created September 29, 2015 11:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nomeata/cf7960caeb0b2c1697b8 to your computer and use it in GitHub Desktop.
How does that get slower?
- go [Occ=LoopBreaker] :: Integer -> Int -> [Integer]
- [LclId, Arity=1, Str=DmdType <L,U>]
- go =
- \ (x :: Integer) ->
- let {
- xs [Dmd=<L,C(U)>] :: Int -> [Integer]
- [LclId, Str=DmdType]
- xs =
- go
- (case eqInteger# w2 lvl3 of wild4 { __DEFAULT ->
- case tagToEnum# wild4 of _ [Occ=Dead] {
- False -> modInteger (timesInteger x x) w2;
- True -> divZeroError
- }
- }) } in
- let {
- lvl9 :: [Integer]
- [LclId, Str=DmdType]
- lvl9 = : x ([]) } in
- \ (m :: Int) ->
- case m of _ [Occ=Dead] { I# ds1 ->
- case ds1 of ds2 {
- __DEFAULT -> : x (xs (I# (-# ds2 1)));
- 1 -> lvl9
- }
- }; } in
+ $wgo [InlPrag=[0], Occ=LoopBreaker] :: Integer -> Int# -> [Integer]
+ [LclId, Arity=2, Str=DmdType <L,U><S,1*U>]
+ $wgo =
+ \ (w3 :: Integer) (ww2 :: Int#) ->
+ case ww2 of ds1 {
+ __DEFAULT ->
+ : w3
+ ($wgo
+ (case eqInteger# w2 lvl3 of wild4 { __DEFAULT ->
+ case tagToEnum# wild4 of _ [Occ=Dead] {
+ False -> modInteger (timesInteger w3 w3) w2;
+ True -> divZeroError
+ }
+ })
+ (-# ds1 1));
+ 1 -> : w3 ([])
+ }; } in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment