Issue metadata
Sign in to add a comment
|
Performance issue: one JS function suddenly takes ~60% of runtime in BBC Micro Emulator
Reported by
m...@godbolt.org,
Dec 11 2016
|
||||||||||||||||||||||||
Issue descriptionChrome Version : 55.0.2883.75 (Official Build) (64-bit) Operating System and Version: Linux Ubuntu 16.10 URLs (if applicable) : https://bbc.godbolt.org/ Description of performance problem: Since upgrading to Chrome 55, the emulator I wrote on bbc.godbolt.org (source on GitHub at https://github.com/mattgodbolt/jsbeeb) has slowed down by a factor of two. Profiling reveals that 60% of the time is now spent in a single function: "video.clearFb' which is a simple loop to write 0xff000000 to a set of Uint32Array locations. A similar function nearby (which writes values looked up from a table instead of a constant) is much faster. In fact, if one replaces the call to clearFb with the equivalent call to "blitFb", things speed up immensely. Much more detail is filed on a bug on jsbeeb at https://github.com/mattgodbolt/jsbeeb/issues/138 where I describe some things I tried to see if I could speed it up. Given the nature of the slowdown I wonder if there's something unusual going on with the particular way this function is written, although I tried rephrasing it several ways. The attached trace is of me running the emulator with an intense cpu profile going (which just runs instructions). This can be reproduced by getting the JS console up and typing 'profileCpu()' in the console. I'd be delighted to help with any other information needed to track this down. Apologies if I've overlooked something.
,
Dec 11 2016
Looks like the keyed IC regression.
,
Dec 11 2016
I have a strong suspicion that this is a duplicate of https://bugs.chromium.org/p/chromium/issues/detail?id=666947. The perf test is always storing a HeapNumber, since we cannot represent 0xFF000000 as Smi in boxed form, which was the core issue that caused the vellamo regression. ishell@ please verify and request stable merge if it's the same. I think the patch had decent coverage now and it's not too risky IMHO.
,
Dec 12 2016
,
Dec 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/fc0a0d7699c039df53961d47291981b151aba44f commit fc0a0d7699c039df53961d47291981b151aba44f Author: ishell@chromium.org <ishell@chromium.org> Date: Mon Dec 12 08:43:20 2016 Merged: [ic] Prevent KeyedStoreIC from being generic when storing doubles to integer typed arrays. Revision: c819616376b6835b61ff4f9e2667ba94ab25fe7f BUG= chromium:666947 , chromium:673137 LOG=N NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true R=bmeurer@chromium.org Review-Url: https://codereview.chromium.org/2564323003 . Cr-Commit-Position: refs/branch-heads/5.5@{#66} Cr-Branched-From: 3cbd5838bd8376103daa45d69dade929ee4e0092-refs/heads/5.5.372@{#1} Cr-Branched-From: b3c8b0ce2c9af0528837d8309625118d4096553b-refs/heads/master@{#40015} [modify] https://crrev.com/fc0a0d7699c039df53961d47291981b151aba44f/src/code-stub-assembler.cc [modify] https://crrev.com/fc0a0d7699c039df53961d47291981b151aba44f/src/code-stub-assembler.h [modify] https://crrev.com/fc0a0d7699c039df53961d47291981b151aba44f/src/compiler/code-assembler.cc [modify] https://crrev.com/fc0a0d7699c039df53961d47291981b151aba44f/src/compiler/code-assembler.h |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by m...@godbolt.org
, Dec 11 2016