Bien vu

Alexandre


2014-04-30 10:22 GMT-04:00 Jean Privat <notifications@github.com>:

> In benchmarks/languages/string/bench.nit:
>
> > +	#include <time.h>
> > +`}
> > +
> > +#Clock function for execution time
> > +fun clock: Int `{ return clock(); `}
> > +fun clock_resolution: Int `{ return CLOCKS_PER_SEC; `}
> > +
> > +#Function for grouping micro-bench which run together
> > +
> > +fun benchFlatString(count: Int)
> > +do
> > +	var function = new Function
> > +	function.benchConcatShortString(count)
> > +
> > +	var firstTime = clock/clock_resolution
> > +	print "Temps : " + firstTime.to_s + " s"
>
> Voire print "Temps: {firstTime}s" car le `to_s` est implicite ici Le
> 2014-04-30 10:19, "Alexandre Terrasa" <notifications@github.com> a écrit :
> … <#145b3042795ab409_>
>  In benchmarks/languages/string/bench.nit: > + #include <time.h> > +`} > +
> > +#Clock function for execution time > +fun clock: Int `{ return clock();
> `} > +fun clock_resolution: Int `{ return CLOCKS_PER_SEC; `} > + >
> +#Function for grouping micro-bench which run together > + > +fun
> benchFlatString(count: Int) > +do > + var function = new Function > +
> function.benchConcatShortString(count) > + > + var firstTime =
> clock/clock_resolution > + print "Temps : " + firstTime.to_s + " s" Utilise
> les super-strings: print "Temps: {firstTime.to_s} s" — Reply to this email
> directly or view it on GitHub<
> https://github.com/privat/nit/pull/429/files#r12145253> .
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/privat/nit/pull/429/files#r12145390>
> .
>