Closed Bug 412210 Opened 17 years ago Closed 17 years ago

Spidermonkey faster at -O2 with msvc

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sayrer, Assigned: sayrer)

References

Details

(Keywords: perf)

Attachments

(1 file, 2 obsolete files)

Crowder's claim we should measure this finally got to me, and he was right. Good for a noticeable SunSpider in-browser win.
Attached patch browser patch (obsolete) — Splinter Review
Switch to -O2 -GL. GL doesn't change the numbers, but will allow us to do PGO later.
Assignee: general → sayrer
Status: NEW → ASSIGNED
Attachment #296872 - Flags: review?(brendan)
Attached patch Makefile.in and config.mk (obsolete) — Splinter Review
easy to get the shell at the same time
Attachment #296872 - Attachment is obsolete: true
Attachment #296873 - Flags: review?(brendan)
Attachment #296872 - Flags: review?(brendan)
Attached patch correct typoSplinter Review
sigh, not my day
Attachment #296873 - Attachment is obsolete: true
Attachment #296874 - Flags: review?(brendan)
Attachment #296873 - Flags: review?(brendan)
Comment on attachment 296874 [details] [diff] [review]
correct typo

Could you tell me, what does -LTCG do? Maybe worth a comment if interesting.

Feel free to mirror into Makefile.ref. Thanks,

/be
Attachment #296874 - Flags: review?(brendan)
Attachment #296874 - Flags: review+
Attachment #296874 - Flags: approval1.9+
(In reply to comment #4)
> (From update of attachment 296874 [details] [diff] [review])
> Could you tell me, what does -LTCG do? Maybe worth a comment if interesting.

Paraphrasing MS docs: The -GL option and the linker command -LTCG (Link Time Code Generation) combine to allow whole-program optimzation. Whole program optimization allows the compiler to perform optimizations with information on all modules in the program. Without whole program optimization, optimizations are performed on a per module (compiland) basis. Improvements:

    * Optimize the use of registers across function boundaries.
    * Do a better job of tracking modifications to global data, allowing a 
      reduction in the number of loads and stores.
    * Do a better job of tracking the possible set of items modified by a
      pointer dereference, reducing the numbers of loads and stores.
    * Inline a function in a module even when the function is defined in 
      another module.

LTCG can take flags--LTCG:PGINSTRUMENT and LTCG:PGOPTIMIZE. This works just like a two-pass gcc PGO build. Build once with PGINSTRUMENT, run over some input (talos, ajax test suites), build with PGOPTIMIZE. This allows for better branch prediction.
Blocks: 117611
Keywords: perf
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: