cjgdev / benchpress Goto Github PK
View Code? Open in Web Editor NEWC++11 header only micro benchmark framework
License: MIT License
C++11 header only micro benchmark framework
License: MIT License
I would expect a parameter like --list
to see the list of benchmarks I can then choose with --bench
.
The ns/op value is the number of nanoseconds for one iteration inside the loop "for (size_t i = 0; i < ctx->num_iterations(); ++i)" ?
While I like the current approach to give the framework the control about how often to execute a benchmark, I would like to provide the number of executions myself.
Hi,
After clean build, all of the examples fail with std::regex_error
``` ./src/examples/example_01`
terminate called after throwing an instance of 'std::regex_error'
what(): regex_error
[1] 388 abort (core dumped) ./src/examples/example_01
After reading other bug reports I gather that gcc-4.8 is simply not supported (I know it's outdated but update is not an option for us at the moment). I suppose that the best approach would be to update the readme with minimal supported compiler version.
Best Regards,
Budziq
Is this considered a feature I don't know how to use or a bug?
thell@bb3cae46c3ad:~/Projects/Track/benchpress/src/examples$ ./example_01 --benchtime 3
hello
hello
hello
hello
hello
hello
example 5 1000182494 ns/op
./example_01 6.001s
I was not expecting hello
to be re-iterated.
This:
g++ -std=c++11 -o flint flint.cpp -lflint
with flint.cpp
:
#include <flint/fmpq_poly.h>
#include <benchpress/benchpress.hpp>
#include "series-benchmark.h"
int main()
{
fmpq_poly_t x, y, z;
fmpq_poly_init (x);
fmpq_poly_init (y);
fmpq_poly_init (z);
fmpq_poly_set_coeff_ui(x, 1, 1);
fmpq_poly_sin_series(x, x, N);
fmpq_poly_set_coeff_ui(y, 1, 1);
fmpq_poly_cos_series(y, y, N);
BENCHMARK("flint", [&](benchpress::context* ctx) {
for (size_t i = 0; i < ctx->num_iterations(); ++i) {
fmpq_poly_mullow (z , x , y, N) ;
}
})
fmpq_poly_clear (x);
fmpq_poly_clear (y);
fmpq_poly_clear (z);
return 0;
}
produces
/tmp/ccSDe92z.o: In function `benchpress::registration::get_ptr()':
flint.cpp:(.text._ZN10benchpress12registration7get_ptrEv[_ZN10benchpress12registration7get_ptrEv]+0xa): undefined reference to `benchpress::registration::d_this'
flint.cpp:(.text._ZN10benchpress12registration7get_ptrEv[_ZN10benchpress12registration7get_ptrEv]+0x42): undefined reference to `benchpress::registration::d_this'
flint.cpp:(.text._ZN10benchpress12registration7get_ptrEv[_ZN10benchpress12registration7get_ptrEv]+0x49): undefined reference to `benchpress::registration::d_this'
collect2: error: ld returned 1 exit status
Please Help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.