Updated Benchmark for Modern Browsers#2
Open
ScottMichaud wants to merge 3 commits intoluic:masterfrom
Open
Conversation
Better reflects the state of browser performance.
As browsers get better, the test is taking too long to converge. A positive step will now add ten cubes. A negative step will still subtract one.
When browsers continue to get better, and computers continue to get faster, prevent them from exceeding the maximum. Previously, no objects were added but the counter continued to claim that they were.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request comprises of three changes.
First, the hard upper limit of 2000 cubes is no longer sufficient for browsers on high-end computers. It has been increased to 10,000. This might need to be raised soon, but the maximum has a performance hit. I feel that it is better to raise often than add too much irrelevant overhead.
Second, the benchmark will now warn you when you have maxed out, and it will alert you of the variable to adjust. I did not add the ability to adjust the maximum dynamically from within the app. It simply alerts users that their test setup exceeds the benchmark and notifies them of the variable to change.
Third, with the cube count growing in size, I added a variable to adjust the number of cubes added per tick. By default this is 10, which means that the benchmark should complete about 10x as fast as it previously did, without sacrificing too much precision.