Skip to content

Use Map rather than list in Exports#2129

Merged
garyb merged 1 commit into0.9from
name-map
May 15, 2016
Merged

Use Map rather than list in Exports#2129
garyb merged 1 commit into0.9from
name-map

Conversation

@garyb
Copy link
Copy Markdown
Member

@garyb garyb commented May 15, 2016

Resolves #2124 (maybe). It avoids the lists anyway, and improves the code in most places where the list was used previously.

@hdgarrood
Copy link
Copy Markdown
Contributor

👍 agreed, seems like an improvement to me even if we don't consider performance.

@hdgarrood
Copy link
Copy Markdown
Contributor

I think it's #2124 that this (hopefully) fixes, incidentally.

@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 15, 2016

Oops, right you are!

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.01%) to 55.89% when pulling b7a6f2b on name-map into 7f29fad on 0.9.

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented May 15, 2016

Looks good! How does the profiler output look now?


Note (not sure if you're aware or not, but I'll record it here anyway) that Stack will make a profiling build with

stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts"

(taken from here)

If you run psc with +RTS -p, you'll get a profiling report, and with -hc will give a heap profile.

Creating a separate Stack working directory with --work-dir can also be useful, since you'll end up doing a lot of rebuilding with and without profiling options otherwise.

@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 15, 2016

I haven't got anything significant I can try it on yet, since this is the 0.9 branch.

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented May 15, 2016

Ah right, of course. Even building something like purescript-strings should give you a reasonable profile to look at though.

The other hotspot in the profile was a space leak in the lexer, which the lexLazy variant should fix. I should remember to come back to that.

@garyb garyb merged commit 2da4825 into 0.9 May 15, 2016
@garyb garyb deleted the name-map branch May 15, 2016 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants