Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Symbol hash to u64 #911

Merged
merged 1 commit into from
Oct 24, 2020
Merged

Change Symbol hash to u64 #911

merged 1 commit into from
Oct 24, 2020

Conversation

HalidOdat
Copy link
Member

It changes the following:

  • Change symbol hash from u32 to u64, This is done because it is possible to overflow the u32 hash since its only 4 bilion, but a u64 is 18_446_744_073_709_551_616 even if we crated a symbol every 1ns it would take 584 years (so... pretty much will never overflow)

@HalidOdat HalidOdat added enhancement New feature or request builtins PRs and Issues related to builtins/intrinsics execution Issues or PRs related to code execution labels Oct 23, 2020
@HalidOdat HalidOdat added this to the v0.11.0 milestone Oct 23, 2020
@github-actions
Copy link

Test262 conformance changes:

Test result master count PR count difference
Total 78,415 78,415 0
Passed 18,461 18,461 0
Ignored 15,547 15,547 0
Failed 44,407 44,407 0
Panics 1,129 1,129 0
Conformance 23.54 23.54 0.00%

@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #911 into master will not change coverage.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #911   +/-   ##
=======================================
  Coverage   59.19%   59.19%           
=======================================
  Files         166      166           
  Lines       10512    10512           
=======================================
  Hits         6223     6223           
  Misses       4289     4289           
Impacted Files Coverage Δ
boa/src/builtins/symbol/mod.rs 77.27% <66.66%> (ø)
boa/src/context.rs 61.64% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 863a4cf...84ae17f. Read the comment docs.

@github-actions
Copy link

Benchmark for fd692ac

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 376.8±13.30ns 428.2±12.58ns -12.00%
Arithmetic operations (Full) 289.8±35.12µs 280.3±15.70µs +3.39%
Array access (Execution) 8.8±0.53µs 8.9±0.54µs -1.12%
Array access (Full) 316.4±16.49µs 313.3±64.22µs +0.99%
Array creation (Execution) 3.0±0.14ms 2.9±0.13ms +3.45%
Array creation (Full) 3.3±0.23ms 3.1±0.11ms +6.45%
Array pop (Execution) 1084.4±50.94µs 1087.4±44.71µs -0.28%
Array pop (Full) 1684.4±83.42µs 1532.6±124.00µs +9.90%
Boolean Object Access (Execution) 5.0±0.26µs 5.2±0.17µs -3.85%
Boolean Object Access (Full) 314.1±27.46µs 285.4±13.31µs +10.06%
Clean js (Execution) 800.6±35.12µs 773.3±22.20µs +3.53%
Clean js (Full) 1121.7±47.00µs 1083.4±59.95µs +3.54%
Clean js (Parser) 42.0±2.32µs 42.7±2.13µs -1.64%
Create Realm 508.0±23.18ns 502.5±25.00ns +1.09%
Dynamic Object Property Access (Execution) 6.6±0.50µs 6.4±0.20µs +3.12%
Dynamic Object Property Access (Full) 306.3±13.04µs 291.6±9.30µs +5.04%
Expression (Parser) 7.6±0.32µs 7.4±0.27µs +2.70%
Fibonacci (Execution) 994.6±66.14µs 979.8±40.09µs +1.51%
Fibonacci (Full) 1424.5±105.51µs 1325.2±41.92µs +7.49%
For loop (Execution) 25.6±0.85µs 24.7±1.00µs +3.64%
For loop (Full) 321.1±12.67µs 324.8±18.87µs -1.14%
For loop (Parser) 21.0±0.95µs 20.4±1.09µs +2.94%
Goal Symbols (Parser) 14.1±0.59µs 13.1±0.54µs +7.63%
Hello World (Parser) 3.8±0.24µs 3.7±0.17µs +2.70%
Long file (Parser) 888.8±44.37ns 852.9±26.66ns +4.21%
Mini js (Execution) 703.2±24.40µs 690.7±24.58µs +1.81%
Mini js (Full) 1032.0±43.03µs 996.2±39.89µs +3.59%
Mini js (Parser) 36.6±1.32µs 35.6±2.06µs +2.81%
Number Object Access (Execution) 4.1±0.28µs 4.0±0.09µs +2.50%
Number Object Access (Full) 291.1±13.02µs 289.0±13.19µs +0.73%
Object Creation (Execution) 5.7±0.33µs 5.6±0.75µs +1.79%
Object Creation (Full) 313.3±22.45µs 288.6±23.91µs +8.56%
RegExp (Execution) 13.6±1.39µs 11.3±0.53µs +20.35%
RegExp (Full) 324.6±18.63µs 291.9±15.06µs +11.20%
RegExp Literal (Execution) 12.7±0.65µs 11.4±0.51µs +11.40%
RegExp Literal (Full) 322.0±20.84µs 295.4±10.72µs +9.00%
RegExp Literal Creation (Execution) 11.7±1.14µs 10.9±0.47µs +7.34%
RegExp Literal Creation (Full) 305.0±27.80µs 295.8±53.18µs +3.11%
Static Object Property Access (Execution) 6.1±0.36µs 5.7±0.31µs +7.02%
Static Object Property Access (Full) 300.2±16.62µs 283.9±9.24µs +5.74%
String Object Access (Execution) 8.2±0.50µs 8.1±0.24µs +1.23%
String Object Access (Full) 301.3±11.29µs 298.8±12.83µs +0.84%
String comparison (Execution) 7.4±0.28µs 7.2±0.42µs +2.78%
String comparison (Full) 308.3±20.44µs 293.9±12.14µs +4.90%
String concatenation (Execution) 6.1±0.40µs 5.9±0.23µs +3.39%
String concatenation (Full) 306.8±24.86µs 286.9±17.40µs +6.94%
String copy (Execution) 5.0±0.27µs 4.5±0.23µs +11.11%
String copy (Full) 283.4±17.36µs 285.2±14.96µs -0.63%
Symbols (Execution) 4.3±0.21µs 4.2±0.23µs +2.38%
Symbols (Full) 282.6±12.97µs 278.7±11.63µs +1.40%

@Razican Razican merged commit 16e3d2e into master Oct 24, 2020
@HalidOdat HalidOdat deleted the u64-symbol-hash branch October 24, 2020 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics enhancement New feature or request execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants