Re: Benchmarking in D

2010-04-13 Thread Nathan Tuggy
On 2010-04-12 11:09, "Jérôme M. Berger" wrote: Chris Mueller wrote: On what OS? On linux, you can do: time foo to get the run time for program foo, including elapsed clock time, time spent in the program itself and time spent in the kernel on behalf of the program (for I/O, mallocs, etc);

Re: Benchmarking in D

2010-04-12 Thread Jérôme M. Berger
Chris Mueller wrote: >> On what OS? On linux, you can do: >> >> time foo >> to get the run time for program foo, including elapsed clock time, >> time spent in the program itself and time spent in the kernel on >> behalf of the program (for I/O, mallocs, etc); >> >> cat /proc/$(pidof foo)/statu

Re: Benchmarking in D

2010-04-11 Thread Chris Mueller
There's the benchmark() function in Phobos: http://www.digitalmars.com/d/2.0/phobos/std_date.html#benchmark Don't know if that's what you're really looking for, though. ... void bench(R)(string label, R delegate() dg, uint times = 1 ) { scope pc = new PerformanceCounter; real time = u

Re: Benchmarking in D

2010-04-11 Thread Jérôme M. Berger
Chris Mueller wrote: > Hi everyone, > > I would like to benchmark some of my D routines for performance testing > and like to compare it with some alternative implementations in e.g. > time and memory consumption. > > I'm not really experienced in this field and want to ask if someone can > shar

Re: Benchmarking in D

2010-04-11 Thread Robert Jacques
On Sun, 11 Apr 2010 05:27:58 -0300, Chris Mueller wrote: Hi everyone, I would like to benchmark some of my D routines for performance testing and like to compare it with some alternative implementations in e.g. time and memory consumption. I'm not really experienced in this field and

Re: Benchmarking in D

2010-04-11 Thread Justin Spahr-Summers
On Sun, 11 Apr 2010 10:27:58 +0200, Chris Mueller wrote: > > Hi everyone, > > I would like to benchmark some of my D routines for performance testing > and like to compare it with some alternative implementations in e.g. > time and memory consumption. > > I'm not really experienced in this

Benchmarking in D

2010-04-11 Thread Chris Mueller
Hi everyone, I would like to benchmark some of my D routines for performance testing and like to compare it with some alternative implementations in e.g. time and memory consumption. I'm not really experienced in this field and want to ask if someone can share his knowledge. Are there som