-
Notifications
You must be signed in to change notification settings - Fork 145
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 benchmarks #169
Merged
Merged
Add benchmarks #169
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mingxwa
force-pushed
the
user/mingxwa/benchmarks
branch
2 times, most recently
from
October 2, 2024 07:40
5100105
to
5de03cf
Compare
mingxwa
force-pushed
the
user/mingxwa/benchmarks
branch
from
October 4, 2024 05:46
5de03cf
to
767a58e
Compare
tian-lt
approved these changes
Oct 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
guominrui
approved these changes
Oct 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
benchmarks
to benchmark the library in various scenarios.proxy
and virtual functions on small/large objects.proxy
,std::unique_ptr
,std::shared_ptr
andstd::any
for small/large objects.Observed from the CI build:
proxy
vs. virtual functionsproxy
is about 254.1% fasterproxy
is about 31.8% fasterproxy
is about 38.0% fasterproxy
is about 3.5% fasterproxy
vs. virtual functionsproxy
is about 269.9% fasterproxy
is about 28.3% fasterproxy
is about 17.4% fasterproxy
is about 2.5% fasterproxy
vs.std::unique_ptr
proxy
is about 375.4% fasterproxy
is about 369.8% fasterproxy
is about 347.1% fasterproxy
is about 254.6% fasterproxy
vs.std::shared_ptr
(without memory pool)proxy
is about 494.4% fasterproxy
is about 894.4% fasterproxy
is about 847.2% fasterproxy
is about 355.6% fasterproxy
vs.std::shared_ptr
(with memory pool)proxy
is about 246.5% fasterproxy
is about 589.5% fasterproxy
is about 566.0% fasterproxy
is about 157.3% fasterproxy
vs.std::any
proxy
is about 61.6% fasterproxy
is about 235.7% fasterproxy
is about 222.5% fasterproxy
is about 20.0% fasterproxy
(without memory pool) vs.std::unique_ptr
proxy
is about 0.5% slowerproxy
is about 2.7% slowerproxy
is about 7.4% fasterproxy
is about 8.0% slowerproxy
(with memory pool) vs.std::unique_ptr
proxy
is about 117.4% fasterproxy
is about 113.6% fasterproxy
is about 161.1% fasterproxy
is about 88.5% fasterproxy
vs.std::shared_ptr
(both without memory pool)proxy
is about 12.1% fasterproxy
is about 5.9% fasterproxy
is about 16.0% fasterproxy
is about 11.5% fasterproxy
vs.std::shared_ptr
(both with memory pool)proxy
is about 8.7% fasterproxy
is about 16.4% fasterproxy
is about 8.6% fasterproxy
is about 46.8% fasterproxy
(without memory pool) vs.std::any
proxy
is about 33.6% fasterproxy
is about 6.2% slowerproxy
is about 5.5% fasterproxy
is about 3.7% fasterproxy
(with memory pool) vs.std::any
proxy
is about 192.1% fasterproxy
is about 105.9% fasterproxy
is about 156.4% fasterproxy
is about 112.5% fasterNotes
int
field.void*
) and a singleint
field.int
,std::shared_ptr<int>
andstd::unique_lock<std::mutex>
.std::array<char, 100>
,std::array<std::string, 3>
andstd::unique_lock<std::mutex> padded with void*[15]
are used as large object.std::pmr::unsynchronized_pool_resource
is used.