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

Using unstable sort for sorting keys on to_json() for GC objects #833

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

Razican
Copy link
Member

@Razican Razican commented Oct 9, 2020

This solves the clippy warning we were getting, and it might speed up things a bit. As far as I understand, there is no need to use stable sorting, right? Especially since we don't have two keys with the same name.

@Razican Razican added performance Performance related changes and issues builtins PRs and Issues related to builtins/intrinsics labels Oct 9, 2020
@Razican Razican added this to the v0.11.0 milestone Oct 9, 2020
@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #833 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #833   +/-   ##
=======================================
  Coverage   59.26%   59.26%           
=======================================
  Files         157      157           
  Lines       10035    10035           
=======================================
  Hits         5947     5947           
  Misses       4088     4088           
Impacted Files Coverage Δ
boa/src/object/gcobject.rs 73.23% <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 01dbf8b...d71ab0a. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Oct 9, 2020

Benchmark for 17ac8bd

Click to view benchmark
Test PR Benchmark Master Benchmark %
Arithmetic operations (Execution) 364.3±0.90ns 359.7±3.91ns +1.28%
Arithmetic operations (Full) 234.1±1.28µs 225.1±2.99µs +4.00%
Array access (Execution) 7.8±0.06µs 7.8±0.09µs 0.00%
Array access (Full) 250.9±1.50µs 246.9±2.82µs +1.62%
Array creation (Execution) 2.8±0.01ms 2.8±0.03ms 0.00%
Array creation (Full) 3.0±0.01ms 3.0±0.02ms 0.00%
Array pop (Execution) 1049.3±6.56µs 1039.1±11.06µs +0.98%
Array pop (Full) 1462.9±9.46µs 1443.3±15.77µs +1.36%
Boolean Object Access (Execution) 4.6±0.01µs 4.6±0.05µs 0.00%
Boolean Object Access (Full) 242.6±4.17µs 236.9±2.95µs +2.41%
Clean js (Execution) 701.5±4.37µs 695.5±7.63µs +0.86%
Clean js (Full) 979.0±6.05µs 967.4±10.97µs +1.20%
Clean js (Parser) 36.8±0.26µs 36.2±0.62µs +1.66%
Create Realm 461.0±3.03ns 464.6±8.31ns -0.77%
Dynamic Object Property Access (Execution) 5.5±0.04µs 5.5±0.07µs 0.00%
Dynamic Object Property Access (Full) 247.9±1.27µs 240.3±3.57µs +3.16%
Expression (Parser) 6.9±0.04µs 6.9±0.09µs 0.00%
Fibonacci (Execution) 807.3±3.48µs 805.5±8.63µs +0.22%
Fibonacci (Full) 1075.6±8.70µs 1062.9±11.15µs +1.19%
For loop (Execution) 22.1±0.14µs 21.7±0.26µs +1.84%
For loop (Full) 268.9±0.83µs 267.7±2.79µs +0.45%
For loop (Parser) 18.0±0.09µs 17.6±0.21µs +2.27%
Goal Symbols (Parser) 12.4±0.08µs 12.3±0.15µs +0.81%
Hello World (Parser) 3.1±0.01µs 3.0±0.04µs +3.33%
Long file (Parser) 754.1±5.13ns 752.1±9.94ns +0.27%
Mini js (Execution) 628.4±5.42µs 624.6±8.05µs +0.61%
Mini js (Full) 881.9±9.37µs 862.7±11.02µs +2.23%
Mini js (Parser) 32.3±0.19µs 31.4±0.45µs +2.87%
Number Object Access (Execution) 3.6±0.01µs 3.6±0.06µs 0.00%
Number Object Access (Full) 240.3±0.97µs 236.4±3.30µs +1.65%
Object Creation (Execution) 4.7±0.05µs 4.7±0.05µs 0.00%
Object Creation (Full) 240.4±1.49µs 242.2±2.09µs -0.74%
RegExp (Execution) 9.5±0.05µs 9.4±0.12µs +1.06%
RegExp (Full) 247.2±1.32µs 242.3±3.09µs +2.02%
RegExp Literal (Execution) 10.5±0.07µs 10.6±0.11µs -0.94%
RegExp Literal (Full) 253.5±1.98µs 243.4±2.90µs +4.15%
RegExp Literal Creation (Execution) 9.4±0.07µs 9.5±0.10µs -1.05%
RegExp Literal Creation (Full) 245.1±1.49µs 241.6±3.95µs +1.45%
Static Object Property Access (Execution) 4.9±0.02µs 5.0±0.05µs -2.00%
Static Object Property Access (Full) 242.3±1.23µs 240.1±2.67µs +0.92%
String Object Access (Execution) 6.9±0.27µs 6.8±0.07µs +1.47%
String Object Access (Full) 243.8±2.70µs 243.0±2.22µs +0.33%
String comparison (Execution) 6.4±0.04µs 6.3±0.06µs +1.59%
String comparison (Full) 258.9±16.01µs 240.9±3.00µs +7.47%
String concatenation (Execution) 5.2±0.03µs 5.2±0.08µs 0.00%
String concatenation (Full) 244.7±3.33µs 235.8±2.76µs +3.77%
String copy (Execution) 4.0±0.02µs 4.0±0.05µs 0.00%
String copy (Full) 235.0±1.26µs 231.8±3.16µs +1.38%
Symbols (Execution) 3.4±0.02µs 3.4±0.04µs 0.00%
Symbols (Full) 225.8±5.16µs 221.5±2.25µs +1.94%

@RageKnify RageKnify merged commit e82dee1 into master Oct 9, 2020
@RageKnify RageKnify deleted the fix_clippy branch October 9, 2020 10:50
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 performance Performance related changes and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants