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

[Merged by Bors] - Fix BigInt and Number comparison #1887

Closed
wants to merge 2 commits into from

Conversation

HalidOdat
Copy link
Member

Fixes BigInt and Number comparison, and vice versa. Before we were removing the decimal point of the floating-point number which was causing cases like 0.000001 > 0n (or 0n < 0.000001) to fail.

@HalidOdat HalidOdat added bug Something isn't working execution Issues or PRs related to code execution labels Mar 2, 2022
@HalidOdat HalidOdat added this to the v0.14.0 milestone Mar 2, 2022
@github-actions
Copy link

github-actions bot commented Mar 2, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 88,428 88,428 0
Passed 43,978 43,986 +8
Ignored 21,495 21,495 0
Failed 22,955 22,947 -8
Panics 0 0 0
Conformance 49.73% 49.74% +0.01%
Fixed tests (8):
test/language/expressions/greater-than/bigint-and-number.js [strict mode] (previously Failed)
test/language/expressions/greater-than/bigint-and-number.js (previously Failed)
test/language/expressions/less-than/bigint-and-number.js [strict mode] (previously Failed)
test/language/expressions/less-than/bigint-and-number.js (previously Failed)
test/language/expressions/less-than-or-equal/bigint-and-number.js [strict mode] (previously Failed)
test/language/expressions/less-than-or-equal/bigint-and-number.js (previously Failed)
test/language/expressions/greater-than-or-equal/bigint-and-number.js [strict mode] (previously Failed)
test/language/expressions/greater-than-or-equal/bigint-and-number.js (previously Failed)

@HalidOdat
Copy link
Member Author

Hmmm... There are some broken tests. I will make this draft till I fix them.

@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #1887 (5d6d882) into main (48f23b3) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1887      +/-   ##
==========================================
+ Coverage   45.86%   45.88%   +0.01%     
==========================================
  Files         206      206              
  Lines       17097    17101       +4     
==========================================
+ Hits         7842     7846       +4     
  Misses       9255     9255              
Impacted Files Coverage Δ
boa_engine/src/value/operations.rs 38.07% <100.00%> (+0.83%) ⬆️

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 48f23b3...5d6d882. Read the comment docs.

@HalidOdat HalidOdat marked this pull request as draft March 2, 2022 12:27
@RageKnify RageKnify self-requested a review March 2, 2022 12:28
@github-actions
Copy link

github-actions bot commented Mar 2, 2022

Benchmark for 7fc7d49

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 620.2±1.54ns 602.2±9.48ns -2.90%
Arithmetic operations (Execution) 2.4±0.00µs 2.4±0.01µs 0.00%
Arithmetic operations (Parser) 5.7±0.01µs 5.6±0.08µs -1.75%
Array access (Compiler) 1494.3±5.77ns 1474.7±24.27ns -1.31%
Array access (Execution) 11.5±0.02µs 11.6±0.16µs +0.87%
Array access (Parser) 12.7±0.02µs 12.4±0.16µs -2.36%
Array creation (Compiler) 2.1±0.01µs 2.1±0.04µs 0.00%
Array creation (Execution) 3.8±0.01ms 3.7±0.01ms -2.63%
Array creation (Parser) 14.4±0.02µs 13.9±0.21µs -3.47%
Array pop (Compiler) 4.7±0.02µs 4.7±0.05µs 0.00%
Array pop (Execution) 1656.9±14.74µs 1601.3±12.36µs -3.36%
Array pop (Parser) 148.5±0.18µs 145.0±2.02µs -2.36%
Boolean Object Access (Compiler) 1182.4±3.44ns 1158.6±22.04ns -2.01%
Boolean Object Access (Execution) 6.9±0.04µs 6.9±0.08µs 0.00%
Boolean Object Access (Parser) 15.8±0.03µs 15.6±0.21µs -1.27%
Clean js (Compiler) 4.0±0.01µs 3.9±0.06µs -2.50%
Clean js (Execution) 1305.4±10.59µs 1316.0±7.80µs +0.81%
Clean js (Parser) 30.9±0.05µs 30.3±0.47µs -1.94%
Create Realm 324.9±4.03ns 327.8±6.57ns +0.89%
Dynamic Object Property Access (Compiler) 1924.9±5.13ns 1873.5±26.36ns -2.67%
Dynamic Object Property Access (Execution) 8.1±0.03µs 8.1±0.03µs 0.00%
Dynamic Object Property Access (Parser) 11.0±0.15µs 10.8±0.16µs -1.82%
Fibonacci (Compiler) 2.6±0.01µs 2.6±0.03µs 0.00%
Fibonacci (Execution) 2.1±0.00ms 2.0±0.03ms -4.76%
Fibonacci (Parser) 17.3±0.16µs 17.2±0.23µs -0.58%
For loop (Compiler) 2.3±0.01µs 2.3±0.04µs 0.00%
For loop (Execution) 50.2±0.14µs 50.0±0.49µs -0.40%
For loop (Parser) 14.9±0.14µs 14.4±0.22µs -3.36%
Mini js (Compiler) 3.8±0.01µs 3.8±0.05µs 0.00%
Mini js (Execution) 1194.4±7.37µs 1204.4±8.90µs +0.84%
Mini js (Parser) 26.8±0.06µs 26.3±0.36µs -1.87%
Number Object Access (Compiler) 1115.2±4.30ns 1097.4±17.60ns -1.60%
Number Object Access (Execution) 5.3±0.04µs 5.4±0.06µs +1.89%
Number Object Access (Parser) 12.0±0.01µs 11.8±0.16µs -1.67%
Object Creation (Compiler) 1664.3±8.55ns 1629.1±25.93ns -2.12%
Object Creation (Execution) 7.3±0.03µs 7.1±0.15µs -2.74%
Object Creation (Parser) 9.8±0.09µs 9.7±0.11µs -1.02%
RegExp (Compiler) 1944.0±4.88ns 1886.3±39.08ns -2.97%
RegExp (Execution) 14.2±0.04µs 14.2±0.05µs 0.00%
RegExp (Parser) 10.8±0.02µs 10.4±0.16µs -3.70%
RegExp Creation (Compiler) 1706.1±8.21ns 1662.7±26.88ns -2.54%
RegExp Creation (Execution) 10.7±0.03µs 10.7±0.12µs 0.00%
RegExp Creation (Parser) 9.1±0.07µs 8.8±0.13µs -3.30%
RegExp Literal (Compiler) 1944.8±4.96ns 1882.9±37.84ns -3.18%
RegExp Literal (Execution) 14.3±0.03µs 14.2±0.13µs -0.70%
RegExp Literal (Parser) 8.7±0.02µs 8.4±0.16µs -3.45%
RegExp Literal Creation (Compiler) 1698.8±8.80ns 1622.8±22.86ns -4.47%
RegExp Literal Creation (Execution) 10.7±0.05µs 10.7±0.04µs 0.00%
RegExp Literal Creation (Parser) 6.7±0.09µs 6.7±0.13µs 0.00%
Static Object Property Access (Compiler) 1693.8±8.32ns 1661.4±21.48ns -1.91%
Static Object Property Access (Execution) 7.6±0.02µs 7.6±0.07µs 0.00%
Static Object Property Access (Parser) 10.4±0.17µs 10.2±0.16µs -1.92%
String Object Access (Compiler) 1615.7±6.80ns 1593.7±27.86ns -1.36%
String Object Access (Execution) 9.2±0.04µs 9.1±0.10µs -1.09%
String Object Access (Parser) 15.5±0.02µs 15.2±0.21µs -1.94%
String comparison (Compiler) 2.5±0.01µs 2.5±0.05µs 0.00%
String comparison (Execution) 7.0±0.03µs 7.0±0.03µs 0.00%
String comparison (Parser) 11.8±0.06µs 11.5±0.18µs -2.54%
String concatenation (Compiler) 1927.5±5.20ns 1886.8±28.12ns -2.11%
String concatenation (Execution) 6.3±0.03µs 6.3±0.09µs 0.00%
String concatenation (Parser) 8.0±0.02µs 7.8±0.10µs -2.50%
String copy (Compiler) 1545.2±7.94ns 1519.3±25.34ns -1.68%
String copy (Execution) 5.6±0.02µs 5.7±0.04µs +1.79%
String copy (Parser) 6.0±0.02µs 5.8±0.11µs -3.33%
Symbols (Compiler) 1092.6±3.21ns 1075.8±17.29ns -1.54%
Symbols (Execution) 5.4±0.01µs 5.4±0.04µs 0.00%
Symbols (Parser) 4.5±0.04µs 4.3±0.06µs -4.44%

@Razican
Copy link
Member

Razican commented Mar 12, 2022

@HalidOdat do you think this could be ready during the weekend, or should we move it to 0.15?

@HalidOdat
Copy link
Member Author

@HalidOdat do you think this could be ready during the weekend, or should we move it to 0.15?

I will try to fix this during this weekend :)

@HalidOdat HalidOdat force-pushed the fix/bigint-number-comparison branch from c05d8ef to ebd7fd9 Compare March 14, 2022 14:17
@HalidOdat HalidOdat force-pushed the fix/bigint-number-comparison branch from ebd7fd9 to 65219f7 Compare March 14, 2022 14:57
@github-actions
Copy link

Benchmark for 4687c0b

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 624.6±36.09ns 619.3±27.01ns -0.85%
Arithmetic operations (Execution) 2.3±0.12µs 2.2±0.13µs -4.35%
Arithmetic operations (Parser) 6.0±0.34µs 6.1±0.31µs +1.67%
Array access (Compiler) 1634.0±81.81ns 1657.1±189.28ns +1.41%
Array access (Execution) 11.4±0.70µs 12.1±0.41µs +6.14%
Array access (Parser) 13.3±0.86µs 13.8±0.55µs +3.76%
Array creation (Compiler) 2.3±0.11µs 2.3±0.19µs 0.00%
Array creation (Execution) 3.6±0.14ms 3.7±0.19ms +2.78%
Array creation (Parser) 15.0±0.68µs 16.0±1.01µs +6.67%
Array pop (Compiler) 4.7±0.26µs 4.4±0.20µs -6.38%
Array pop (Execution) 1608.6±212.60µs 1570.2±80.02µs -2.39%
Array pop (Parser) 157.1±7.64µs 159.8±7.47µs +1.72%
Boolean Object Access (Compiler) 1323.6±52.57ns 1355.2±56.42ns +2.39%
Boolean Object Access (Execution) 7.0±0.45µs 7.2±0.38µs +2.86%
Boolean Object Access (Parser) 15.4±0.69µs 16.3±0.77µs +5.84%
Clean js (Compiler) 4.2±0.19µs 4.2±0.19µs 0.00%
Clean js (Execution) 1243.3±87.64µs 1276.6±82.95µs +2.68%
Clean js (Parser) 32.1±1.84µs 32.8±1.36µs +2.18%
Create Realm 322.2±14.82ns 317.0±19.08ns -1.61%
Dynamic Object Property Access (Compiler) 1990.8±93.98ns 2.0±0.38µs +0.46%
Dynamic Object Property Access (Execution) 8.0±0.56µs 8.2±0.43µs +2.50%
Dynamic Object Property Access (Parser) 11.7±0.56µs 12.1±0.69µs +3.42%
Fibonacci (Compiler) 2.9±0.25µs 3.0±0.13µs +3.45%
Fibonacci (Execution) 2.2±0.11ms 2.2±0.08ms 0.00%
Fibonacci (Parser) 18.2±0.88µs 18.2±0.82µs 0.00%
For loop (Compiler) 2.5±0.12µs 2.4±0.12µs -4.00%
For loop (Execution) 49.1±4.23µs 50.3±7.97µs +2.44%
For loop (Parser) 15.3±0.72µs 15.5±0.88µs +1.31%
Mini js (Compiler) 4.0±0.16µs 4.0±0.17µs 0.00%
Mini js (Execution) 1102.9±50.17µs 1145.7±64.71µs +3.88%
Mini js (Parser) 28.3±1.49µs 28.0±1.28µs -1.06%
Number Object Access (Compiler) 1258.2±61.98ns 1278.1±54.55ns +1.58%
Number Object Access (Execution) 5.4±0.25µs 5.4±0.38µs 0.00%
Number Object Access (Parser) 12.2±0.60µs 12.9±1.27µs +5.74%
Object Creation (Compiler) 1759.1±75.01ns 1750.4±82.43ns -0.49%
Object Creation (Execution) 7.3±0.37µs 7.7±0.40µs +5.48%
Object Creation (Parser) 10.1±0.58µs 10.3±0.53µs +1.98%
RegExp (Compiler) 2.0±0.11µs 2.0±0.10µs 0.00%
RegExp (Execution) 15.3±0.87µs 16.1±1.22µs +5.23%
RegExp (Parser) 11.3±0.60µs 11.4±0.55µs +0.88%
RegExp Creation (Compiler) 1748.3±77.76ns 1775.1±67.49ns +1.53%
RegExp Creation (Execution) 10.7±0.39µs 10.9±0.49µs +1.87%
RegExp Creation (Parser) 9.3±0.68µs 9.6±0.47µs +3.23%
RegExp Literal (Compiler) 2.1±0.10µs 2.0±0.10µs -4.76%
RegExp Literal (Execution) 14.8±0.65µs 15.7±0.73µs +6.08%
RegExp Literal (Parser) 9.0±0.45µs 9.2±0.50µs +2.22%
RegExp Literal Creation (Compiler) 1783.2±82.98ns 1730.3±69.96ns -2.97%
RegExp Literal Creation (Execution) 11.2±0.57µs 10.8±0.71µs -3.57%
RegExp Literal Creation (Parser) 7.1±0.33µs 7.4±0.36µs +4.23%
Static Object Property Access (Compiler) 1768.4±93.18ns 1780.9±81.70ns +0.71%
Static Object Property Access (Execution) 7.6±0.39µs 8.1±0.38µs +6.58%
Static Object Property Access (Parser) 11.0±0.50µs 11.2±0.54µs +1.82%
String Object Access (Compiler) 1788.9±102.39ns 1783.7±77.45ns -0.29%
String Object Access (Execution) 8.9±0.44µs 9.0±0.62µs +1.12%
String Object Access (Parser) 15.4±0.84µs 16.1±1.95µs +4.55%
String comparison (Compiler) 2.7±0.12µs 2.7±0.16µs 0.00%
String comparison (Execution) 7.1±1.51µs 7.1±0.48µs 0.00%
String comparison (Parser) 12.2±0.70µs 12.7±0.71µs +4.10%
String concatenation (Compiler) 2.1±0.08µs 2.1±0.08µs 0.00%
String concatenation (Execution) 6.3±0.34µs 6.5±0.41µs +3.17%
String concatenation (Parser) 8.5±0.41µs 8.7±0.47µs +2.35%
String copy (Compiler) 1670.7±94.03ns 1612.0±68.30ns -3.51%
String copy (Execution) 5.9±0.24µs 5.8±0.26µs -1.69%
String copy (Parser) 6.3±0.28µs 6.5±0.30µs +3.17%
Symbols (Compiler) 1218.2±81.96ns 1154.8±68.24ns -5.20%
Symbols (Execution) 5.6±0.75µs 5.5±0.35µs -1.79%
Symbols (Parser) 4.8±0.28µs 5.0±0.39µs +4.17%

@HalidOdat HalidOdat marked this pull request as ready for review March 14, 2022 15:08
@github-actions
Copy link

Benchmark for e0e0b54

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 488.2±0.74ns 501.6±1.42ns +2.74%
Arithmetic operations (Execution) 1940.2±17.46ns 1989.8±2.28ns +2.56%
Arithmetic operations (Parser) 5.2±0.01µs 5.2±0.01µs 0.00%
Array access (Compiler) 1252.2±2.59ns 1272.9±11.51ns +1.65%
Array access (Execution) 9.6±0.03µs 9.7±0.04µs +1.04%
Array access (Parser) 11.5±0.02µs 11.7±0.01µs +1.74%
Array creation (Compiler) 1802.5±4.76ns 1808.5±4.93ns +0.33%
Array creation (Execution) 3.2±0.01ms 3.2±0.01ms 0.00%
Array creation (Parser) 13.1±0.01µs 13.4±0.02µs +2.29%
Array pop (Compiler) 3.8±0.01µs 3.8±0.04µs 0.00%
Array pop (Execution) 1376.8±3.66µs 1390.7±3.70µs +1.01%
Array pop (Parser) 129.4±0.11µs 130.2±0.08µs +0.62%
Boolean Object Access (Compiler) 1098.9±3.04ns 1101.0±3.72ns +0.19%
Boolean Object Access (Execution) 5.6±0.01µs 5.8±0.02µs +3.57%
Boolean Object Access (Parser) 13.9±0.01µs 14.3±0.02µs +2.88%
Clean js (Compiler) 3.4±0.01µs 3.4±0.01µs 0.00%
Clean js (Execution) 1074.6±10.64µs 1096.1±8.16µs +2.00%
Clean js (Parser) 27.9±0.05µs 28.6±0.04µs +2.51%
Create Realm 265.8±0.28ns 271.0±1.55ns +1.96%
Dynamic Object Property Access (Compiler) 1628.7±5.00ns 1603.7±25.19ns -1.53%
Dynamic Object Property Access (Execution) 6.6±0.03µs 6.8±0.02µs +3.03%
Dynamic Object Property Access (Parser) 10.2±0.01µs 10.6±0.01µs +3.92%
Fibonacci (Compiler) 2.2±0.01µs 2.3±0.01µs +4.55%
Fibonacci (Execution) 1748.7±1.44µs 1786.6±4.02µs +2.17%
Fibonacci (Parser) 15.7±0.02µs 16.0±0.02µs +1.91%
For loop (Compiler) 1958.5±17.43ns 1937.4±22.79ns -1.08%
For loop (Execution) 41.8±0.06µs 42.5±0.12µs +1.67%
For loop (Parser) 13.4±0.02µs 13.8±0.08µs +2.99%
Mini js (Compiler) 3.2±0.01µs 3.2±0.01µs 0.00%
Mini js (Execution) 990.4±6.69µs 1009.0±6.76µs +1.88%
Mini js (Parser) 24.4±0.03µs 24.8±0.03µs +1.64%
Number Object Access (Compiler) 1016.4±1.83ns 1040.3±2.87ns +2.35%
Number Object Access (Execution) 4.4±0.01µs 4.5±0.01µs +2.27%
Number Object Access (Parser) 10.8±0.02µs 11.0±0.02µs +1.85%
Object Creation (Compiler) 1374.7±5.02ns 1389.9±5.61ns +1.11%
Object Creation (Execution) 6.0±0.02µs 6.0±0.07µs 0.00%
Object Creation (Parser) 8.9±0.02µs 9.2±0.02µs +3.37%
RegExp (Compiler) 1612.9±12.19ns 1614.0±4.88ns +0.07%
RegExp (Execution) 12.0±0.08µs 12.7±0.08µs +5.83%
RegExp (Parser) 9.9±0.02µs 10.2±0.02µs +3.03%
RegExp Creation (Compiler) 1382.3±4.64ns 1402.4±7.85ns +1.45%
RegExp Creation (Execution) 8.9±0.04µs 9.5±0.04µs +6.74%
RegExp Creation (Parser) 8.2±0.01µs 8.4±0.01µs +2.44%
RegExp Literal (Compiler) 1623.8±3.27ns 1619.9±8.94ns -0.24%
RegExp Literal (Execution) 12.0±0.07µs 12.7±0.07µs +5.83%
RegExp Literal (Parser) 7.9±0.01µs 8.1±0.01µs +2.53%
RegExp Literal Creation (Compiler) 1420.0±12.16ns 1399.9±8.58ns -1.42%
RegExp Literal Creation (Execution) 8.9±0.03µs 9.5±0.02µs +6.74%
RegExp Literal Creation (Parser) 6.2±0.01µs 6.3±0.01µs +1.61%
Static Object Property Access (Compiler) 1412.4±5.25ns 1398.5±4.44ns -0.98%
Static Object Property Access (Execution) 6.2±0.03µs 6.3±0.03µs +1.61%
Static Object Property Access (Parser) 9.6±0.02µs 9.8±0.02µs +2.08%
String Object Access (Compiler) 1454.0±7.19ns 1463.8±4.59ns +0.67%
String Object Access (Execution) 7.5±0.03µs 7.4±0.02µs -1.33%
String Object Access (Parser) 13.7±0.18µs 14.1±0.02µs +2.92%
String comparison (Compiler) 2.1±0.00µs 2.1±0.01µs 0.00%
String comparison (Execution) 5.7±0.01µs 5.9±0.01µs +3.51%
String comparison (Parser) 10.6±0.01µs 11.2±0.04µs +5.66%
String concatenation (Compiler) 1630.0±3.11ns 1606.8±2.24ns -1.42%
String concatenation (Execution) 5.2±0.02µs 5.3±0.02µs +1.92%
String concatenation (Parser) 7.3±0.01µs 7.7±0.02µs +5.48%
String copy (Compiler) 1304.4±2.05ns 1302.3±2.80ns -0.16%
String copy (Execution) 4.6±0.01µs 4.8±0.02µs +4.35%
String copy (Parser) 5.5±0.02µs 5.7±0.02µs +3.64%
Symbols (Compiler) 909.3±3.63ns 898.0±2.18ns -1.24%
Symbols (Execution) 4.4±0.01µs 4.5±0.01µs +2.27%
Symbols (Parser) 4.2±0.01µs 4.3±0.00µs +2.38%

@github-actions
Copy link

Benchmark for aab909b

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 446.4±6.02ns 434.6±6.41ns -2.64%
Arithmetic operations (Execution) 1631.6±23.62ns 1705.8±30.43ns +4.55%
Arithmetic operations (Parser) 4.4±0.07µs 4.4±0.06µs 0.00%
Array access (Compiler) 1117.0±16.80ns 1069.7±15.01ns -4.23%
Array access (Execution) 8.1±0.14µs 8.5±0.15µs +4.94%
Array access (Parser) 9.7±0.11µs 9.8±0.15µs +1.03%
Array creation (Compiler) 1599.4±26.13ns 1532.4±28.99ns -4.19%
Array creation (Execution) 2.7±0.04ms 2.7±0.03ms 0.00%
Array creation (Parser) 13.0±0.02µs 11.1±0.18µs -14.62%
Array pop (Compiler) 3.9±0.02µs 3.3±0.07µs -15.38%
Array pop (Execution) 1167.3±22.18µs 1183.4±19.38µs +1.38%
Array pop (Parser) 129.6±0.09µs 109.6±1.35µs -15.43%
Boolean Object Access (Compiler) 973.1±16.21ns 944.6±18.54ns -2.93%
Boolean Object Access (Execution) 5.6±0.01µs 4.9±0.09µs -12.50%
Boolean Object Access (Parser) 11.8±0.20µs 12.4±0.24µs +5.08%
Clean js (Compiler) 2.9±0.04µs 2.8±0.03µs -3.45%
Clean js (Execution) 913.2±12.91µs 930.3±11.74µs +1.87%
Clean js (Parser) 23.6±0.28µs 23.9±0.41µs +1.27%
Create Realm 225.4±4.77ns 254.4±20.18ns +12.87%
Dynamic Object Property Access (Compiler) 1658.0±6.02ns 1387.0±29.47ns -16.34%
Dynamic Object Property Access (Execution) 5.7±0.10µs 5.8±0.09µs +1.75%
Dynamic Object Property Access (Parser) 8.6±0.14µs 8.8±0.14µs +2.33%
Fibonacci (Compiler) 2.3±0.00µs 1931.9±36.45ns -16.00%
Fibonacci (Execution) 1481.2±21.64µs 1515.3±30.84µs +2.30%
Fibonacci (Parser) 13.6±0.13µs 13.3±0.20µs -2.21%
For loop (Compiler) 2.0±0.02µs 1638.7±26.45ns -18.06%
For loop (Execution) 36.4±0.77µs 36.1±0.66µs -0.82%
For loop (Parser) 11.3±0.19µs 11.3±0.17µs 0.00%
Mini js (Compiler) 2.8±0.04µs 2.7±0.04µs -3.57%
Mini js (Execution) 842.8±10.40µs 864.9±14.84µs +2.62%
Mini js (Parser) 21.1±0.41µs 20.8±0.27µs -1.42%
Number Object Access (Compiler) 1068.7±3.47ns 880.5±14.25ns -17.61%
Number Object Access (Execution) 4.5±0.03µs 3.9±0.06µs -13.33%
Number Object Access (Parser) 9.2±0.14µs 9.2±0.14µs 0.00%
Object Creation (Compiler) 1454.1±4.69ns 1173.6±21.65ns -19.29%
Object Creation (Execution) 5.0±0.08µs 5.1±0.08µs +2.00%
Object Creation (Parser) 7.7±0.06µs 7.7±0.15µs 0.00%
RegExp (Compiler) 1478.5±16.10ns 1384.5±25.74ns -6.36%
RegExp (Execution) 10.1±0.17µs 10.8±0.18µs +6.93%
RegExp (Parser) 8.3±0.13µs 8.5±0.21µs +2.41%
RegExp Creation (Compiler) 1446.1±4.14ns 1186.2±22.46ns -17.97%
RegExp Creation (Execution) 7.5±0.12µs 8.1±0.13µs +8.00%
RegExp Creation (Parser) 6.9±0.10µs 7.1±0.13µs +2.90%
RegExp Literal (Compiler) 1425.4±18.82ns 1379.7±23.12ns -3.21%
RegExp Literal (Execution) 10.1±0.15µs 10.7±0.12µs +5.94%
RegExp Literal (Parser) 6.8±0.13µs 6.8±0.10µs 0.00%
RegExp Literal Creation (Compiler) 1463.2±4.40ns 1200.1±18.09ns -17.98%
RegExp Literal Creation (Execution) 7.5±0.10µs 8.2±0.17µs +9.33%
RegExp Literal Creation (Parser) 6.2±0.01µs 5.4±0.09µs -12.90%
Static Object Property Access (Compiler) 1444.8±5.01ns 1205.2±21.23ns -16.58%
Static Object Property Access (Execution) 5.2±0.06µs 5.3±0.08µs +1.92%
Static Object Property Access (Parser) 8.2±0.14µs 8.2±0.13µs 0.00%
String Object Access (Compiler) 1309.9±23.73ns 1241.2±22.32ns -5.24%
String Object Access (Execution) 6.3±0.11µs 6.4±0.15µs +1.59%
String Object Access (Parser) 11.6±0.20µs 11.8±0.17µs +1.72%
String comparison (Compiler) 2.2±0.01µs 1770.3±26.58ns -19.53%
String comparison (Execution) 4.8±0.07µs 5.0±0.09µs +4.17%
String comparison (Parser) 10.6±0.02µs 9.2±0.14µs -13.21%
String concatenation (Compiler) 1711.9±5.44ns 1395.3±21.24ns -18.49%
String concatenation (Execution) 4.4±0.06µs 4.5±0.07µs +2.27%
String concatenation (Parser) 7.3±0.03µs 6.3±0.10µs -13.70%
String copy (Compiler) 1363.3±6.37ns 1101.3±16.23ns -19.22%
String copy (Execution) 3.9±0.05µs 4.0±0.05µs +2.56%
String copy (Parser) 4.6±0.06µs 4.8±0.09µs +4.35%
Symbols (Compiler) 833.3±13.45ns 773.1±12.86ns -7.22%
Symbols (Execution) 3.7±0.06µs 3.9±0.07µs +5.41%
Symbols (Parser) 3.6±0.06µs 3.6±0.06µs 0.00%

@Razican
Copy link
Member

Razican commented Mar 14, 2022

bors r+

bors bot pushed a commit that referenced this pull request Mar 14, 2022
Fixes `BigInt` and `Number` comparison, and vice versa. Before we were removing the decimal point of the floating-point number which was causing cases like `0.000001 > 0n` (or `0n < 0.000001`) to fail.
@bors
Copy link

bors bot commented Mar 14, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Fix BigInt and Number comparison [Merged by Bors] - Fix BigInt and Number comparison Mar 14, 2022
@bors bors bot closed this Mar 14, 2022
@bors bors bot deleted the fix/bigint-number-comparison branch March 14, 2022 18:30
Razican pushed a commit that referenced this pull request Jun 8, 2022
Fixes `BigInt` and `Number` comparison, and vice versa. Before we were removing the decimal point of the floating-point number which was causing cases like `0.000001 > 0n` (or `0n < 0.000001`) to fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants