Cache the fingerprint of sOpt_P

Authored by niteria on Feb 23 2018, 8:28 AM.



Before this change we would compute a hash of
all the command line -optP flags once per file.
With a lot of files and many -optP flags, that's a lot
of repeated work.

I added a new Note that explains the approach and rationale.

Test Plan

new test

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
niteria created this revision.Feb 23 2018, 8:28 AM
niteria updated this revision to Diff 15549.Feb 23 2018, 8:33 AM

fix spurious whitespace change

niteria updated this revision to Diff 15567.Feb 26 2018, 3:40 AM

actually set the expected value in the test

simonpj accepted this revision.Feb 27 2018, 5:01 AM

I'm not following the details, but it looks very plausible to me.


I'd drop the reference to Trac #14697 here. The Note refers to it, and that's all we need here.

This revision is now accepted and ready to land.Feb 27 2018, 5:01 AM

Hmm, interesting, for the test failures on Linux I get completely different numbers.

niteria updated this revision to Diff 15573.Feb 27 2018, 8:00 AM

fix comment

I think T14697 fails because the {{1..10000}} expansion fails. That sounds fixable.

T9630 on the other hand has just been bumped in rGHCf57c3059d7c8b8e00bd3a9f9153c3520f6db14d4, so I believe I just need to rebase.

niteria updated this revision to Diff 15583.Mar 1 2018, 8:34 AM
niteria marked an inline comment as done.

try to please the testrunner

This revision was automatically updated to reflect the committed changes.