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

Add standard library atomic operations to benchmark #35

Merged
merged 1 commit into from
Nov 14, 2017
Merged

Conversation

prashantv
Copy link
Collaborator

Currently, we only benchmark our custom atomic types, but don't
benchmark the standard library types. Add benchmarks for ints and uints
that the standard library supports.

Benchmark results on my machine:
https://gist.github.com/prashantv/4360013d6ec13b16ff983390e5defe73

There's no performance difference between stdlib and the atomic types (thanks to mid-stack inlining), e.g., with i32:

BenchmarkStress/i32/std/serial-8                50000000                41.7 ns/op                                    
BenchmarkStress/i32/serial-8                    30000000                41.2 ns/op                                    

BenchmarkStress/i32/std/parallel-8              10000000               174 ns/op                                      
BenchmarkStress/i32/parallel-8                  10000000               176 ns/op                                      

Currently, we only benchmark our custom atomic types, but don't
benchmark the standard library types. Add benchmarks for ints and uints
that the standard library supports.
@codecov
Copy link

codecov bot commented Nov 14, 2017

Codecov Report

Merging #35 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #35   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         118    118           
=====================================
  Hits          118    118

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 54e9e20...4701494. Read the comment docs.

Copy link

@dorianperkins dorianperkins left a comment

Choose a reason for hiding this comment

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

LGTM

@prashantv prashantv merged commit 8474b86 into master Nov 14, 2017
@prashantv prashantv deleted the std_bench branch November 14, 2017 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants