Very Slow Switch Case handling
Reported by
nassahaw...@gmail.com,
Mar 21 2017
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Steps to reproduce the problem: Run the provided testcase within the Chrome by providing a number - behavior is noticable from 3 and higher. push "Create Code" button push "Run Test" The result appears on the screen. What is the expected behavior? The "bestcaseruns" count shows how many times the switch case which is called is successfully executed within some time, in this case the successful case is the first case (case 0) The worstcaseruns shows how many times it is successful when the value is the last case in the switch-case block (case "length of array"). What went wrong? Runtime increases linearly by the value requested in the switch case. This should not be the case and does not not happen for example in Firefox or IE. Did this work before? N/A Chrome version: Version 57.0.2987.98 Channel: stable OS Version: 6.3 Flash Version: Shockwave Flash 25.0 r0
,
Mar 22 2017
@Chrome-TE: Please confirm and test with Chrome 56 to check if this is a regression. Afterwards please test with Chrome 58 with V8Future enabled (https://v8project.blogspot.de/2017/02/help-us-test-future-of-v8.html). I think this is going to be resolved with V8Future.
,
Mar 23 2017
Below are the test results performed as per C#2. OS platform tested: Windows 10 Test steps followed: ===================== 1. Ran the provided testcase within the Chrome by providing a number - 4 2. Pushed "Create Code" button 3. Pushed "Run Test" 4. Noted down the result displayed on the screen. Chrome versions Best case runs Worst case runs =============== ============== ================ 56.0.2924.87 45152 39353 57.0.2987.110 39196 35537 58.0.3029.33(no flag) 45927 40617 58.0.3029.33(v8 future flag) 13070 41730 59.0.3048.0(no flag) 13165 63555 hablich@/bmeurer@: Could you please review the above and confirm the expected results.
,
Mar 30 2017
,
Mar 30 2017
,
Mar 30 2017
Thanks. nassahawela@gmail.com: What is the purpose of this test? How to interpret the results?
,
Mar 30 2017
The test shows how many times in 5 seconds a loop is executed. Inside the loop a function is called which simply adds using a switch-case to a result depending on the value provided. The switch-case block is created dynamically by the input. In Best case runs the parameter given to the function is 0, meaning that the first one of all the cases is the successful one. Worst case means the successful case is always last one. Problem is, that it should not matter which one is the successful case, given it should be some kind of jump table. Apparently it does, though, the difference is even much higher in bigger switch case blocks (>20). Why the results are reversed in the new version, i cannot say, unfortunately.
,
Mar 30 2017
Thank you for providing more feedback. Adding requester "ajha@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 31 2017
Tested the issue on Win-10 using latest canary #59.0.3056.0. Following are the steps followed to reproduce the issue. ------------ 1. Ran the provided test case within the Chrome by providing a number - 4 2. Pushed "Create Code" button 3. Pushed "Run Test" 4. Noted down the result displayed on the screen. Results (Both canary and firefox): Browsers behaviour Best case runs Worst case runs =============== ============== ================ Canary 18691 40485 Firefox 63211 95270 nassahawela@ - Could you please check the results in both the browsers and please update let us know the expected behavior. Thanks...!!
,
Apr 5 2017
Thanks. bmeurer@ and rmcilroy@, how important is this use case?
,
Apr 6 2017
,
Apr 6 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by dtapu...@chromium.org
, Mar 21 2017