On 2015-03-31 19:05, Jonathan wrote:
Well, I don't consider benchmarks a kind of unit test. So maybe just
this:
It depends on how you look at it. I know Xcode has support for some kind
of unit test benchmark. You can assign a upper value to a benchmark and
if that value is exceed the
On 2015-03-31 01:40, w0rp wrote:
Why add extra syntax for what you can already do pretty nicely with a
library?
It would be nice if D could support a generic syntax for trailing
delegates, i.e.
benchmarks
{
}
Would be lowered to:
benchmarks({
});
Then it can be implemented as a
@kind(benchmark) unittest
Is this possible currently?
Would this do what you're after?
version(benchmark) {
unittest {
import std.conv : to;
int a;
void f() {auto b = to!string(a);}
auto r = benchmark!(f)(10_000);
auto f0Result = to!Duration(r[0]);
writeln(f0Result)
}
}
rdmd -main -- -version=benchmark -unittest myapp.d
Well, I
On Monday, 30 March 2015 at 23:29:40 UTC, Jonathan wrote:
I have no idea if this has been discussed yet, but I was
thinking it would be neat to have benchmark blocks that only
run when specified, like how unittest works.
Code:
benchmarks
{
import std.conv : to;
int a;
void f() {auto b =
On Monday, 30 March 2015 at 23:29:40 UTC, Jonathan wrote:
I have no idea if this has been discussed yet, but I was
thinking it would be neat to have benchmark blocks that only
run when specified, like how unittest works.
Code:
benchmarks
{
import std.conv : to;
int a;
void f() {auto b =
On Monday, 30 March 2015 at 23:29:40 UTC, Jonathan wrote:
Thoughts?
Yes please, but as a part as phobos:
https://github.com/D-Programming-Language/phobos/pull/2995
On Monday, 30 March 2015 at 23:29:40 UTC, Jonathan wrote:
I have no idea if this has been discussed yet, but I was
thinking it would be neat to have benchmark blocks that only
run when specified, like how unittest works.
Code:
benchmarks
{
import std.conv : to;
int a;
void f() {auto b =
I have no idea if this has been discussed yet, but I was thinking
it would be neat to have benchmark blocks that only run when
specified, like how unittest works.
Code:
benchmarks
{
import std.conv : to;
int a;
void f() {auto b = to!string(a);}
auto r = benchmark!(f)(10_000);
auto
On Monday, 30 March 2015 at 23:29:40 UTC, Jonathan wrote:
I have no idea if this has been discussed yet, but I was
thinking it would be neat to have benchmark blocks that only
run when specified, like how unittest works.
Code:
benchmarks
{
import std.conv : to;
int a;
void f() {auto b =
On 3/30/15 4:29 PM, Jonathan wrote:
I have no idea if this has been discussed yet, but I was thinking it
would be neat to have benchmark blocks that only run when specified,
like how unittest works.
Code:
benchmarks
{
import std.conv : to;
int a;
void f() {auto b = to!string(a);}
auto
11 matches
Mail list logo