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] - Replace criterion::black_box with std::hint::black_box #2494

Closed
wants to merge 1 commit into from

Conversation

jedel1043
Copy link
Member

This Pull Request replaces the criterion::black_box function with the recently stabilized std::hint::black_box intrinsic.

@jedel1043 jedel1043 added benchmark Issues and PRs related to the benchmark subsystem. run-benchmark Label used to run banchmarks on PRs labels Dec 19, 2022
@jedel1043 jedel1043 added this to the v0.17.0 milestone 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 #2494 (b35241d) into main (2d9622d) will increase coverage by 0.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2494      +/-   ##
==========================================
+ Coverage   52.57%   52.78%   +0.21%     
==========================================
  Files         344      343       -1     
  Lines       35093    34940     -153     
==========================================
- Hits        18449    18442       -7     
+ Misses      16644    16498     -146     
Impacted Files Coverage Δ
boa_interner/src/lib.rs 80.67% <0.00%> (-3.37%) ⬇️
boa_cli/src/main.rs 0.00% <0.00%> (-1.08%) ⬇️
boa_engine/src/environments/runtime.rs 48.76% <0.00%> (-0.71%) ⬇️
boa_parser/src/lexer/cursor.rs 87.67% <0.00%> (-0.48%) ⬇️
boa_cli/src/helper.rs 0.00% <0.00%> (ø)
boa_examples/src/bin/classes.rs
boa_gc/src/cell.rs 64.40% <0.00%> (+0.56%) ⬆️

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 6ee8310

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 611.3±1.27ns 625.8±27.46ns +2.37%
Arithmetic operations (Execution) 701.3±2.14ns 703.3±2.11ns +0.29%
Arithmetic operations (Parser) 8.1±0.02µs 8.0±0.02µs -1.23%
Array access (Compiler) 1637.0±5.78ns 1633.2±4.09ns -0.23%
Array access (Execution) 11.5±0.04µs 11.7±0.22µs +1.74%
Array access (Parser) 16.4±0.03µs 16.5±0.03µs +0.61%
Array creation (Compiler) 2.5±0.01µs 2.5±0.01µs 0.00%
Array creation (Execution) 1615.7±6.17µs 1630.7±4.10µs +0.93%
Array creation (Parser) 19.5±0.04µs 19.4±0.04µs -0.51%
Array pop (Compiler) 4.8±0.01µs 4.7±0.01µs -2.08%
Array pop (Execution) 948.2±2.87µs 966.8±1.74µs +1.96%
Array pop (Parser) 182.6±0.23µs 180.6±0.47µs -1.10%
Boolean Object Access (Compiler) 1229.0±3.98ns 1215.5±4.70ns -1.10%
Boolean Object Access (Execution) 6.4±0.02µs 6.4±0.03µs 0.00%
Boolean Object Access (Parser) 20.9±0.09µs 20.9±0.04µs 0.00%
Clean js (Compiler) 5.5±0.03µs 5.4±0.01µs -1.82%
Clean js (Execution) 894.2±4.66µs 905.7±4.86µs +1.29%
Clean js (Parser) 40.7±0.10µs 43.0±4.51µs +5.65%
Create Realm 336.5±4.13ns 344.7±13.30ns +2.44%
Dynamic Object Property Access (Compiler) 1907.3±8.85ns 1901.1±6.45ns -0.33%
Dynamic Object Property Access (Execution) 6.2±0.02µs 6.2±0.01µs 0.00%
Dynamic Object Property Access (Parser) 14.7±0.03µs 14.7±0.15µs 0.00%
Fibonacci (Compiler) 2.9±0.01µs 2.9±0.01µs 0.00%
Fibonacci (Execution) 1358.2±3.99µs 1393.0±2.14µs +2.56%
Fibonacci (Parser) 23.2±0.06µs 23.0±0.05µs -0.86%
For loop (Compiler) 2.8±0.00µs 2.8±0.01µs 0.00%
For loop (Execution) 19.9±0.11µs 19.8±0.05µs -0.50%
For loop (Parser) 19.9±0.04µs 20.0±0.03µs +0.50%
Mini js (Compiler) 4.9±0.01µs 4.8±0.01µs -2.04%
Mini js (Execution) 837.7±4.23µs 890.7±34.80µs +6.33%
Mini js (Parser) 35.4±0.04µs 35.5±0.09µs +0.28%
Number Object Access (Compiler) 1144.6±3.49ns 1131.8±1.45ns -1.12%
Number Object Access (Execution) 5.1±0.86µs 4.9±0.02µs -3.92%
Number Object Access (Parser) 15.9±0.05µs 16.0±0.06µs +0.63%
Object Creation (Compiler) 1672.2±4.52ns 1678.4±2.95ns +0.37%
Object Creation (Execution) 5.8±0.03µs 5.8±0.02µs 0.00%
Object Creation (Parser) 12.9±0.03µs 12.9±0.03µs 0.00%
RegExp (Compiler) 1922.1±11.89ns 2.0±0.15µs +4.05%
RegExp (Execution) 16.2±0.10µs 16.5±0.04µs +1.85%
RegExp (Parser) 14.2±0.05µs 15.1±1.19µs +6.34%
RegExp Creation (Compiler) 1717.3±4.88ns 1705.0±3.95ns -0.72%
RegExp Creation (Execution) 11.1±0.08µs 11.1±0.04µs 0.00%
RegExp Creation (Parser) 12.0±0.03µs 12.1±0.25µs +0.83%
RegExp Literal (Compiler) 1919.5±4.36ns 2.0±0.19µs +4.19%
RegExp Literal (Execution) 16.2±0.07µs 16.5±0.04µs +1.85%
RegExp Literal (Parser) 11.4±0.03µs 12.1±0.81µs +6.14%
RegExp Literal Creation (Compiler) 1727.8±5.51ns 1717.4±3.42ns -0.60%
RegExp Literal Creation (Execution) 11.1±0.03µs 11.1±0.03µs 0.00%
RegExp Literal Creation (Parser) 9.1±0.02µs 9.1±0.02µs 0.00%
Static Object Property Access (Compiler) 1692.2±3.49ns 1696.2±2.12ns +0.24%
Static Object Property Access (Execution) 6.0±0.01µs 6.0±0.01µs 0.00%
Static Object Property Access (Parser) 13.9±0.03µs 13.9±0.03µs 0.00%
String Object Access (Compiler) 1553.7±5.14ns 1546.8±3.88ns -0.44%
String Object Access (Execution) 9.2±0.04µs 9.3±0.06µs +1.09%
String Object Access (Parser) 20.2±0.14µs 20.3±0.04µs +0.50%
String comparison (Compiler) 2.6±0.00µs 2.6±0.01µs 0.00%
String comparison (Execution) 5.4±0.01µs 5.4±0.02µs 0.00%
String comparison (Parser) 15.6±0.04µs 15.5±0.02µs -0.64%
String concatenation (Compiler) 2.0±0.01µs 1999.6±8.09ns -0.02%
String concatenation (Execution) 5.4±0.33µs 5.2±0.03µs -3.70%
String concatenation (Parser) 10.7±0.04µs 10.7±0.03µs 0.00%
String copy (Compiler) 1591.7±2.33ns 1572.6±5.13ns -1.20%
String copy (Execution) 5.0±0.37µs 4.8±0.02µs -4.00%
String copy (Parser) 8.0±0.05µs 7.9±0.03µs -1.25%
Symbols (Compiler) 1167.0±4.06ns 1158.4±3.18ns -0.74%
Symbols (Execution) 4.9±0.02µs 5.0±0.02µs +2.04%
Symbols (Parser) 6.3±0.02µs 6.3±0.02µs 0.00%

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.

Good change! Thanks :)

@HalidOdat
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Dec 20, 2022
This Pull Request replaces the `criterion::black_box` function with the recently stabilized `std::hint::black_box` intrinsic.
@bors
Copy link

bors bot commented Dec 20, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Replace criterion::black_box with std::hint::black_box [Merged by Bors] - Replace criterion::black_box with std::hint::black_box Dec 20, 2022
@bors bors bot closed this Dec 20, 2022
@bors bors bot deleted the std-black-box branch December 20, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Issues and PRs related to the benchmark subsystem. run-benchmark Label used to run banchmarks on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants