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] - Cleanup inline annotations #2493

Closed
wants to merge 4 commits into from
Closed

Conversation

jedel1043
Copy link
Member

Per the Standard Library development guide:

You can add #[inline]:

  • To public, small, non-generic functions.

You shouldn't need #[inline]:

  • On methods that have any generics in scope.
  • On methods on traits that don't have a default implementation.

#[inline] can always be introduced later, so if you're in doubt they can just be removed.

This PR follows this guideline to reduce the number of #[inline] annotations in our code, removing the annotation in:

  • Non-public functions
  • Generic functions
  • Medium and big functions.

Hopefully this shouldn't impact our perf at all, but let's wait to see the benchmark results.

@jedel1043 jedel1043 added technical debt Internal Category for changelog run-benchmark Label used to run banchmarks on PRs labels Dec 19, 2022
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 94,172 94,172 0
Passed 69,656 69,656 0
Ignored 18,771 18,771 0
Failed 5,745 5,745 0
Panics 0 0 0
Conformance 73.97% 73.97% 0.00%

@codecov
Copy link

codecov bot commented Dec 19, 2022

Codecov Report

Merging #2493 (daed3c8) into main (4660579) will increase coverage by 0.05%.
The diff coverage is 28.94%.

@@            Coverage Diff             @@
##             main    #2493      +/-   ##
==========================================
+ Coverage   52.74%   52.80%   +0.05%     
==========================================
  Files         344      343       -1     
  Lines       34952    34874      -78     
==========================================
- Hits        18435    18414      -21     
+ Misses      16517    16460      -57     
Impacted Files Coverage Δ
boa_ast/src/expression/access.rs 48.19% <ø> (ø)
boa_ast/src/expression/await.rs 66.66% <ø> (ø)
boa_ast/src/expression/literal/array.rs 35.48% <ø> (ø)
boa_ast/src/expression/literal/object.rs 26.62% <ø> (ø)
boa_ast/src/expression/operator/assign/mod.rs 71.42% <ø> (ø)
boa_ast/src/expression/operator/binary/mod.rs 86.36% <ø> (ø)
boa_ast/src/expression/operator/unary/mod.rs 52.63% <ø> (ø)
boa_ast/src/function/async_arrow_function.rs 0.00% <0.00%> (ø)
boa_ast/src/operations.rs 77.65% <ø> (-1.65%) ⬇️
boa_ast/src/position.rs 93.10% <ø> (+41.37%) ⬆️
... and 116 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

Benchmark for 78e2605

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 509.3±0.59ns 515.5±0.54ns +1.22%
Arithmetic operations (Execution) 581.3±0.67ns 582.9±0.72ns +0.28%
Arithmetic operations (Parser) 7.3±0.01µs 7.3±0.03µs 0.00%
Array access (Compiler) 1369.8±2.14ns 1390.6±1.79ns +1.52%
Array access (Execution) 9.5±0.03µs 9.2±0.01µs -3.16%
Array access (Parser) 14.7±0.04µs 14.7±0.02µs 0.00%
Array creation (Compiler) 2.1±0.00µs 2.2±0.01µs +4.76%
Array creation (Execution) 1363.7±4.94µs 1352.2±2.51µs -0.84%
Array creation (Parser) 17.4±0.03µs 17.3±0.02µs -0.57%
Array pop (Compiler) 4.0±0.01µs 4.0±0.01µs 0.00%
Array pop (Execution) 788.6±3.31µs 782.2±1.27µs -0.81%
Array pop (Parser) 158.6±0.16µs 158.9±0.15µs +0.19%
Boolean Object Access (Compiler) 1191.2±1.92ns 1193.1±1.69ns +0.16%
Boolean Object Access (Execution) 5.3±0.02µs 5.1±0.01µs -3.77%
Boolean Object Access (Parser) 18.5±0.02µs 18.4±0.04µs -0.54%
Clean js (Compiler) 4.7±0.01µs 4.8±0.01µs +2.13%
Clean js (Execution) 741.7±2.88µs 745.7±2.43µs +0.54%
Clean js (Parser) 36.6±0.04µs 36.2±0.04µs -1.09%
Create Realm 281.6±0.22ns 312.3±2.91ns +10.90%
Dynamic Object Property Access (Compiler) 1596.6±1.93ns 1629.0±2.57ns +2.03%
Dynamic Object Property Access (Execution) 5.1±0.02µs 5.1±0.01µs 0.00%
Dynamic Object Property Access (Parser) 13.2±0.04µs 13.3±0.01µs +0.76%
Fibonacci (Compiler) 2.5±0.01µs 2.5±0.00µs 0.00%
Fibonacci (Execution) 1135.0±5.02µs 1112.1±3.05µs -2.02%
Fibonacci (Parser) 20.6±0.02µs 20.5±0.02µs -0.49%
For loop (Compiler) 2.4±0.00µs 2.5±0.00µs +4.17%
For loop (Execution) 16.4±0.05µs 16.1±0.04µs -1.83%
For loop (Parser) 17.7±0.02µs 17.8±0.02µs +0.56%
Mini js (Compiler) 4.1±0.01µs 4.1±0.01µs 0.00%
Mini js (Execution) 698.9±5.25µs 701.1±2.95µs +0.31%
Mini js (Parser) 31.7±0.05µs 31.5±0.02µs -0.63%
Number Object Access (Compiler) 1075.0±2.14ns 1077.1±1.51ns +0.20%
Number Object Access (Execution) 4.1±0.01µs 3.9±0.01µs -4.88%
Number Object Access (Parser) 14.1±0.03µs 13.9±0.02µs -1.42%
Object Creation (Compiler) 1417.3±4.02ns 1395.8±2.79ns -1.52%
Object Creation (Execution) 4.7±0.02µs 4.8±0.02µs +2.13%
Object Creation (Parser) 11.6±0.05µs 11.5±0.02µs -0.86%
RegExp (Compiler) 1599.7±3.59ns 1613.0±2.61ns +0.83%
RegExp (Execution) 13.6±0.04µs 13.7±0.03µs +0.74%
RegExp (Parser) 12.7±0.02µs 12.8±0.04µs +0.79%
RegExp Creation (Compiler) 1429.8±2.31ns 1448.8±1.80ns +1.33%
RegExp Creation (Execution) 9.2±0.03µs 9.4±0.02µs +2.17%
RegExp Creation (Parser) 10.7±0.02µs 10.6±0.02µs -0.93%
RegExp Literal (Compiler) 1602.0±3.30ns 1631.7±1.61ns +1.85%
RegExp Literal (Execution) 13.6±0.04µs 13.7±0.04µs +0.74%
RegExp Literal (Parser) 10.3±0.02µs 10.3±0.08µs 0.00%
RegExp Literal Creation (Compiler) 1429.0±2.39ns 1449.7±2.16ns +1.45%
RegExp Literal Creation (Execution) 9.3±0.02µs 9.4±0.08µs +1.08%
RegExp Literal Creation (Parser) 8.2±0.02µs 8.1±0.01µs -1.22%
Static Object Property Access (Compiler) 1434.9±3.35ns 1425.4±1.92ns -0.66%
Static Object Property Access (Execution) 5.0±0.01µs 5.0±0.01µs 0.00%
Static Object Property Access (Parser) 12.5±0.05µs 12.4±0.02µs -0.80%
String Object Access (Compiler) 1422.2±1.08ns 1436.0±1.61ns +0.97%
String Object Access (Execution) 7.7±0.01µs 7.2±0.01µs -6.49%
String Object Access (Parser) 17.8±0.02µs 17.6±0.02µs -1.12%
String comparison (Compiler) 2.2±0.01µs 2.2±0.01µs 0.00%
String comparison (Execution) 4.5±0.02µs 4.4±0.01µs -2.22%
String comparison (Parser) 13.9±0.02µs 13.9±0.03µs 0.00%
String concatenation (Compiler) 1667.5±2.26ns 1727.3±8.14ns +3.59%
String concatenation (Execution) 4.2±0.01µs 4.1±0.01µs -2.38%
String concatenation (Parser) 9.6±0.01µs 9.7±0.03µs +1.04%
String copy (Compiler) 1317.5±2.93ns 1335.6±2.15ns +1.37%
String copy (Execution) 4.0±0.02µs 3.9±0.01µs -2.50%
String copy (Parser) 7.2±0.01µs 7.2±0.01µs 0.00%
Symbols (Compiler) 973.6±2.68ns 987.3±0.89ns +1.41%
Symbols (Execution) 4.1±0.02µs 3.9±0.02µs -4.88%
Symbols (Parser) 5.8±0.01µs 5.7±0.01µs -1.72%

@jedel1043
Copy link
Member Author

Everything looks good! This should be alright then.

@jedel1043
Copy link
Member Author

jedel1043 commented Dec 19, 2022

Huh, the spaces between docs and functions are the kind of thing I expected rustfmt to catch, but I guess not...

Copy link
Contributor

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have the one question regarding why you removed the From<&Value> for Value implementation.

Also I don't want to spam with a bunch of comments that say the same, but there were a few functions where instead of deleting the line with the #[inline] annotation you replaced it with an empty line.
I think having the empty line between doc-comments/other annotations and the functions doesn't help readability, it's nice to have them be close together to I'd prefer you made them all the same.

edit: nvm, you've handled it and I agree, weird that rustfmt doesn't handle it

Comment on lines -3 to -9
impl From<&Self> for JsValue {
#[inline]
fn from(value: &Self) -> Self {
value.clone()
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what made it so you had to add the .clone()s around the code-base right?
Why did you remove it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly because Rust tends to be very explicit about new allocations, and a From<&T> for T implementation goes against that.

@github-actions
Copy link

Benchmark for cc4bbfa

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 501.0±0.80ns 512.4±0.81ns +2.28%
Arithmetic operations (Execution) 470.7±0.26ns 425.7±0.33ns -9.56%
Arithmetic operations (Parser) 7.7±0.05µs 7.7±0.08µs 0.00%
Array access (Compiler) 1430.1±8.49ns 1503.9±11.82ns +5.16%
Array access (Execution) 10.3±0.12µs 9.9±0.02µs -3.88%
Array access (Parser) 16.4±0.03µs 16.2±0.07µs -1.22%
Array creation (Compiler) 2.3±0.01µs 2.3±0.01µs 0.00%
Array creation (Execution) 1492.1±4.59µs 1504.2±6.77µs +0.81%
Array creation (Parser) 19.3±0.04µs 19.1±0.05µs -1.04%
Array pop (Compiler) 3.9±0.00µs 4.2±0.02µs +7.69%
Array pop (Execution) 875.2±3.94µs 867.0±0.96µs -0.94%
Array pop (Parser) 173.0±0.78µs 171.6±0.14µs -0.81%
Boolean Object Access (Compiler) 1214.5±2.90ns 1224.0±6.45ns +0.78%
Boolean Object Access (Execution) 5.7±0.02µs 5.5±0.01µs -3.51%
Boolean Object Access (Parser) 20.2±0.17µs 19.8±0.19µs -1.98%
Clean js (Compiler) 5.0±0.01µs 5.2±0.01µs +4.00%
Clean js (Execution) 809.4±5.56µs 814.2±3.91µs +0.59%
Clean js (Parser) 40.6±0.09µs 39.4±0.07µs -2.96%
Create Realm 287.7±0.48ns 311.4±2.27ns +8.24%
Dynamic Object Property Access (Compiler) 1687.2±1.82ns 1782.5±17.60ns +5.65%
Dynamic Object Property Access (Execution) 5.5±0.01µs 5.4±0.02µs -1.82%
Dynamic Object Property Access (Parser) 14.8±0.05µs 14.6±0.04µs -1.35%
Fibonacci (Compiler) 2.7±0.01µs 2.8±0.04µs +3.70%
Fibonacci (Execution) 1221.0±2.23µs 1221.0±6.54µs 0.00%
Fibonacci (Parser) 22.7±0.03µs 22.5±0.06µs -0.88%
For loop (Compiler) 2.6±0.01µs 2.7±0.01µs +3.85%
For loop (Execution) 17.2±0.03µs 16.3±0.05µs -5.23%
For loop (Parser) 19.7±0.02µs 19.5±0.05µs -1.02%
Mini js (Compiler) 4.4±0.02µs 4.4±0.01µs 0.00%
Mini js (Execution) 757.3±6.03µs 764.3±2.93µs +0.92%
Mini js (Parser) 35.0±0.04µs 34.5±0.06µs -1.43%
Number Object Access (Compiler) 1103.5±4.47ns 1103.1±1.30ns -0.04%
Number Object Access (Execution) 4.5±0.06µs 4.2±0.03µs -6.67%
Number Object Access (Parser) 15.7±0.09µs 15.2±0.06µs -3.18%
Object Creation (Compiler) 1454.7±2.57ns 1524.3±19.85ns +4.78%
Object Creation (Execution) 5.1±0.02µs 5.2±0.01µs +1.96%
Object Creation (Parser) 13.1±0.06µs 12.8±0.04µs -2.29%
RegExp (Compiler) 1693.4±4.38ns 1773.5±15.78ns +4.73%
RegExp (Execution) 14.9±0.08µs 14.6±0.30µs -2.01%
RegExp (Parser) 14.2±0.03µs 13.9±0.04µs -2.11%
RegExp Creation (Compiler) 1513.8±2.98ns 1543.7±6.44ns +1.98%
RegExp Creation (Execution) 10.0±0.03µs 9.9±0.03µs -1.00%
RegExp Creation (Parser) 11.9±0.04µs 11.6±0.04µs -2.52%
RegExp Literal (Compiler) 1706.7±9.08ns 1757.4±20.63ns +2.97%
RegExp Literal (Execution) 14.8±0.04µs 14.6±0.05µs -1.35%
RegExp Literal (Parser) 11.3±0.02µs 11.1±0.03µs -1.77%
RegExp Literal Creation (Compiler) 1507.4±3.22ns 1550.5±3.47ns +2.86%
RegExp Literal Creation (Execution) 10.1±0.02µs 9.9±0.02µs -1.98%
RegExp Literal Creation (Parser) 9.1±0.04µs 8.9±0.04µs -2.20%
Static Object Property Access (Compiler) 1472.6±1.51ns 1570.3±16.77ns +6.63%
Static Object Property Access (Execution) 5.4±0.02µs 5.3±0.02µs -1.85%
Static Object Property Access (Parser) 14.1±0.04µs 13.7±0.04µs -2.84%
String Object Access (Compiler) 1469.1±2.79ns 1490.4±9.79ns +1.45%
String Object Access (Execution) 8.5±0.02µs 7.9±0.01µs -7.06%
String Object Access (Parser) 19.6±0.04µs 19.2±0.06µs -2.04%
String comparison (Compiler) 2.3±0.01µs 2.4±0.05µs +4.35%
String comparison (Execution) 4.8±0.01µs 4.6±0.03µs -4.17%
String comparison (Parser) 15.5±0.11µs 15.4±0.02µs -0.65%
String concatenation (Compiler) 1779.2±4.31ns 1834.1±45.15ns +3.09%
String concatenation (Execution) 4.5±0.02µs 4.4±0.01µs -2.22%
String concatenation (Parser) 10.8±0.05µs 10.6±0.03µs -1.85%
String copy (Compiler) 1392.4±2.21ns 1437.4±9.40ns +3.23%
String copy (Execution) 4.2±0.03µs 4.1±0.04µs -2.38%
String copy (Parser) 8.3±0.02µs 8.1±0.04µs -2.41%
Symbols (Compiler) 1013.1±1.78ns 1052.4±2.87ns +3.88%
Symbols (Execution) 4.3±0.01µs 4.3±0.02µs 0.00%
Symbols (Parser) 6.6±0.03µs 6.4±0.03µs -3.03%

@jedel1043 jedel1043 requested a review from RageKnify December 19, 2022 21:20
@github-actions
Copy link

Benchmark for 9d8c6d2

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 495.8±0.89ns 501.9±0.66ns +1.23%
Arithmetic operations (Execution) 472.8±0.30ns 423.6±0.42ns -10.41%
Arithmetic operations (Parser) 7.8±0.02µs 7.9±0.07µs +1.28%
Array access (Compiler) 1417.9±3.12ns 1472.9±10.56ns +3.88%
Array access (Execution) 10.7±0.08µs 9.8±0.02µs -8.41%
Array access (Parser) 16.3±0.03µs 16.2±0.04µs -0.61%
Array creation (Compiler) 2.3±0.01µs 2.3±0.01µs 0.00%
Array creation (Execution) 1478.2±3.09µs 1514.1±18.15µs +2.43%
Array creation (Parser) 19.2±0.03µs 19.2±0.09µs 0.00%
Array pop (Compiler) 3.9±0.00µs 4.2±0.01µs +7.69%
Array pop (Execution) 871.5±7.70µs 870.8±3.16µs -0.08%
Array pop (Parser) 172.6±0.21µs 170.9±0.17µs -0.98%
Boolean Object Access (Compiler) 1218.5±10.40ns 1212.9±3.41ns -0.46%
Boolean Object Access (Execution) 5.8±0.01µs 5.7±0.01µs -1.72%
Boolean Object Access (Parser) 20.3±0.09µs 19.9±0.18µs -1.97%
Clean js (Compiler) 5.0±0.02µs 5.1±0.01µs +2.00%
Clean js (Execution) 819.6±4.60µs 818.7±3.31µs -0.11%
Clean js (Parser) 40.1±0.05µs 39.7±0.06µs -1.00%
Create Realm 285.8±0.78ns 321.1±0.45ns +12.35%
Dynamic Object Property Access (Compiler) 1693.1±1.88ns 1749.5±29.23ns +3.33%
Dynamic Object Property Access (Execution) 5.5±0.02µs 5.5±0.01µs 0.00%
Dynamic Object Property Access (Parser) 14.7±0.04µs 14.4±0.05µs -2.04%
Fibonacci (Compiler) 2.7±0.00µs 2.7±0.04µs 0.00%
Fibonacci (Execution) 1237.0±10.56µs 1208.0±6.93µs -2.34%
Fibonacci (Parser) 22.6±0.06µs 22.4±0.03µs -0.88%
For loop (Compiler) 2.6±0.01µs 2.6±0.01µs 0.00%
For loop (Execution) 17.4±0.03µs 16.3±0.05µs -6.32%
For loop (Parser) 19.3±0.03µs 19.5±0.04µs +1.04%
Mini js (Compiler) 4.3±0.02µs 4.4±0.03µs +2.33%
Mini js (Execution) 760.9±5.38µs 762.7±3.95µs +0.24%
Mini js (Parser) 34.7±0.05µs 34.6±0.05µs -0.29%
Number Object Access (Compiler) 1110.9±19.15ns 1099.5±3.82ns -1.03%
Number Object Access (Execution) 4.4±0.01µs 4.3±0.02µs -2.27%
Number Object Access (Parser) 15.5±0.07µs 15.2±0.06µs -1.94%
Object Creation (Compiler) 1460.5±3.56ns 1474.0±3.03ns +0.92%
Object Creation (Execution) 5.1±0.01µs 5.1±0.02µs 0.00%
Object Creation (Parser) 12.9±0.03µs 12.6±0.04µs -2.33%
RegExp (Compiler) 1678.8±9.16ns 1722.3±2.54ns +2.59%
RegExp (Execution) 14.8±0.05µs 14.5±0.04µs -2.03%
RegExp (Parser) 14.0±0.05µs 13.8±0.04µs -1.43%
RegExp Creation (Compiler) 1491.2±5.67ns 1561.2±3.99ns +4.69%
RegExp Creation (Execution) 10.1±0.02µs 9.9±0.02µs -1.98%
RegExp Creation (Parser) 11.8±0.03µs 11.6±0.02µs -1.69%
RegExp Literal (Compiler) 1688.6±3.09ns 1723.1±2.53ns +2.04%
RegExp Literal (Execution) 14.8±0.05µs 14.5±0.04µs -2.03%
RegExp Literal (Parser) 11.2±0.03µs 11.1±0.04µs -0.89%
RegExp Literal Creation (Compiler) 1502.4±2.71ns 1545.0±4.11ns +2.84%
RegExp Literal Creation (Execution) 10.1±0.02µs 9.9±0.02µs -1.98%
RegExp Literal Creation (Parser) 9.0±0.02µs 9.0±0.03µs 0.00%
Static Object Property Access (Compiler) 1499.6±11.26ns 1525.8±2.31ns +1.75%
Static Object Property Access (Execution) 5.3±0.01µs 5.3±0.02µs 0.00%
Static Object Property Access (Parser) 13.9±0.04µs 13.6±0.04µs -2.16%
String Object Access (Compiler) 1493.2±5.24ns 1489.2±3.75ns -0.27%
String Object Access (Execution) 8.5±0.02µs 8.0±0.01µs -5.88%
String Object Access (Parser) 19.4±0.05µs 19.1±0.06µs -1.55%
String comparison (Compiler) 2.3±0.00µs 2.4±0.04µs +4.35%
String comparison (Execution) 4.8±0.05µs 4.7±0.12µs -2.08%
String comparison (Parser) 15.3±0.02µs 15.3±0.05µs 0.00%
String concatenation (Compiler) 1773.0±5.35ns 1863.9±54.69ns +5.13%
String concatenation (Execution) 4.5±0.01µs 4.4±0.01µs -2.22%
String concatenation (Parser) 10.6±0.02µs 10.6±0.05µs 0.00%
String copy (Compiler) 1407.3±3.69ns 1460.6±54.84ns +3.79%
String copy (Execution) 4.2±0.01µs 4.0±0.03µs -4.76%
String copy (Parser) 8.1±0.02µs 8.0±0.05µs -1.23%
Symbols (Compiler) 1011.7±2.11ns 1041.1±3.02ns +2.91%
Symbols (Execution) 4.3±0.01µs 4.2±0.06µs -2.33%
Symbols (Parser) 6.4±0.03µs 6.3±0.03µs -1.56%

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like it.

boa_interner/src/interned_str.rs Show resolved Hide resolved
boa_interner/src/interned_str.rs Show resolved Hide resolved
boa_interner/src/lib.rs Show resolved Hide resolved
boa_parser/src/parser/mod.rs Show resolved Hide resolved
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! But why are all this clones added?

boa_ast/src/operations.rs Show resolved Hide resolved
@jedel1043
Copy link
Member Author

Looks good! But why are all this clones added?

Current discussion about this: #2493 (comment)

@github-actions
Copy link

Benchmark for a886c8f

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 508.0±0.69ns 509.8±0.62ns +0.35%
Arithmetic operations (Execution) 594.8±0.64ns 582.8±0.78ns -2.02%
Arithmetic operations (Parser) 7.5±0.52µs 7.2±0.01µs -4.00%
Array access (Compiler) 1396.3±14.35ns 1384.2±6.52ns -0.87%
Array access (Execution) 9.6±0.04µs 9.2±0.03µs -4.17%
Array access (Parser) 14.8±0.03µs 14.7±0.01µs -0.68%
Array creation (Compiler) 2.2±0.02µs 2.2±0.00µs 0.00%
Array creation (Execution) 1369.8±3.51µs 1364.3±5.53µs -0.40%
Array creation (Parser) 17.7±0.03µs 17.3±0.02µs -2.26%
Array pop (Compiler) 4.0±0.02µs 4.1±0.00µs +2.50%
Array pop (Execution) 791.7±3.12µs 771.7±1.47µs -2.53%
Array pop (Parser) 160.6±0.12µs 161.8±0.14µs +0.75%
Boolean Object Access (Compiler) 1191.2±2.82ns 1196.3±1.40ns +0.43%
Boolean Object Access (Execution) 5.3±0.02µs 5.1±0.01µs -3.77%
Boolean Object Access (Parser) 18.6±0.02µs 18.4±0.03µs -1.08%
Clean js (Compiler) 4.6±0.01µs 4.7±0.01µs +2.17%
Clean js (Execution) 745.6±11.71µs 738.6±3.54µs -0.94%
Clean js (Parser) 37.1±0.04µs 36.7±0.04µs -1.08%
Create Realm 288.0±0.37ns 311.3±0.62ns +8.09%
Dynamic Object Property Access (Compiler) 1614.2±9.45ns 1646.0±5.39ns +1.97%
Dynamic Object Property Access (Execution) 5.1±0.01µs 5.0±0.01µs -1.96%
Dynamic Object Property Access (Parser) 13.5±0.02µs 13.3±0.03µs -1.48%
Fibonacci (Compiler) 2.5±0.00µs 2.5±0.01µs 0.00%
Fibonacci (Execution) 1122.0±8.19µs 1114.3±3.63µs -0.69%
Fibonacci (Parser) 20.8±0.02µs 20.7±0.01µs -0.48%
For loop (Compiler) 2.5±0.01µs 2.5±0.01µs 0.00%
For loop (Execution) 16.6±0.03µs 16.1±0.05µs -3.01%
For loop (Parser) 18.1±0.02µs 18.0±0.31µs -0.55%
Mini js (Compiler) 4.1±0.01µs 4.1±0.01µs 0.00%
Mini js (Execution) 696.3±9.49µs 692.5±3.60µs -0.55%
Mini js (Parser) 32.3±0.67µs 32.0±0.04µs -0.93%
Number Object Access (Compiler) 1067.0±3.05ns 1074.7±1.04ns +0.72%
Number Object Access (Execution) 4.1±0.01µs 3.9±0.01µs -4.88%
Number Object Access (Parser) 14.2±0.02µs 13.9±0.01µs -2.11%
Object Creation (Compiler) 1415.9±7.64ns 1422.2±4.97ns +0.44%
Object Creation (Execution) 4.8±0.01µs 4.7±0.01µs -2.08%
Object Creation (Parser) 11.7±0.01µs 11.6±0.03µs -0.85%
RegExp (Compiler) 1602.0±2.84ns 1627.3±2.76ns +1.58%
RegExp (Execution) 13.4±0.02µs 13.6±0.04µs +1.49%
RegExp (Parser) 12.9±0.02µs 12.8±0.01µs -0.78%
RegExp Creation (Compiler) 1432.0±2.37ns 1474.8±1.36ns +2.99%
RegExp Creation (Execution) 9.1±0.02µs 9.2±0.02µs +1.10%
RegExp Creation (Parser) 10.8±0.02µs 10.7±0.02µs -0.93%
RegExp Literal (Compiler) 1596.5±3.19ns 1623.4±2.51ns +1.68%
RegExp Literal (Execution) 13.4±0.02µs 13.6±0.04µs +1.49%
RegExp Literal (Parser) 10.4±0.10µs 10.3±0.02µs -0.96%
RegExp Literal Creation (Compiler) 1422.3±2.60ns 1476.3±2.08ns +3.80%
RegExp Literal Creation (Execution) 9.1±0.03µs 9.2±0.01µs +1.10%
RegExp Literal Creation (Parser) 8.2±0.02µs 8.2±0.01µs 0.00%
Static Object Property Access (Compiler) 1450.6±17.68ns 1437.3±6.85ns -0.92%
Static Object Property Access (Execution) 5.0±0.01µs 4.9±0.02µs -2.00%
Static Object Property Access (Parser) 12.6±0.04µs 12.5±0.02µs -0.79%
String Object Access (Compiler) 1420.0±1.53ns 1444.2±1.91ns +1.70%
String Object Access (Execution) 7.5±0.03µs 7.2±0.01µs -4.00%
String Object Access (Parser) 17.9±0.03µs 17.6±0.10µs -1.68%
String comparison (Compiler) 2.2±0.00µs 2.2±0.00µs 0.00%
String comparison (Execution) 4.5±0.01µs 4.4±0.01µs -2.22%
String comparison (Parser) 14.1±0.08µs 14.1±0.01µs 0.00%
String concatenation (Compiler) 1676.0±2.14ns 1662.5±3.14ns -0.81%
String concatenation (Execution) 4.2±0.01µs 4.1±0.01µs -2.38%
String concatenation (Parser) 9.8±0.01µs 9.7±0.02µs -1.02%
String copy (Compiler) 1335.5±2.10ns 1311.4±3.03ns -1.80%
String copy (Execution) 4.0±0.01µs 3.9±0.01µs -2.50%
String copy (Parser) 7.3±0.02µs 7.3±0.01µs 0.00%
Symbols (Compiler) 995.3±8.75ns 993.1±1.40ns -0.22%
Symbols (Execution) 4.1±0.23µs 3.9±0.01µs -4.88%
Symbols (Parser) 5.8±0.01µs 5.7±0.01µs -1.72%

@jedel1043 jedel1043 removed the run-benchmark Label used to run banchmarks on PRs label Dec 20, 2022
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks! :)

Copy link
Contributor

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot pushed a commit that referenced this pull request Dec 20, 2022
Per the [Standard Library development guide](https://std-dev-guide.rust-lang.org/code-considerations/performance/inline.html):

> You can add `#[inline]`:
>
> - To public, small, non-generic functions.
>
> You shouldn't need `#[inline]`:
> - On methods that have any generics in scope.
> - On methods on traits that don't have a default implementation.
>
> `#[inline]` can always be introduced later, so if you're in doubt they can just be removed.

This PR follows this guideline to reduce the number of `#[inline]` annotations in our code, removing the annotation in:
- Non-public functions
- Generic functions
- Medium and big functions.

Hopefully this shouldn't impact our perf at all, but let's wait to see the benchmark results.
@bors
Copy link

bors bot commented Dec 20, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Cleanup inline annotations [Merged by Bors] - Cleanup inline annotations Dec 20, 2022
@bors bors bot closed this Dec 20, 2022
@jedel1043 jedel1043 deleted the inline-checks branch December 20, 2022 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Category for changelog technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants