we should add that to the book chapter :) On Sep 14, 2013, at 2:16 PM, Camillo Bruni <camillobr...@gmail.com> wrote:
> Short Answer: > ------------- > problemSize is used to calibrate your benchmark, so usually you adapt this > value for > your machine. And yes you are right, the result is not divided by the > problemSize. > > > Long Answer: > ------------ > The typical use case is like this: > > MathBench >> benchLoopSinus > 1 to: self problemSize to: [ :i | i sin ] > > Now you have two parameters to modifiy: > 1. the number of samples you take (aka, how many times you measure the time > of #benchLoopSinus) > 2. the problem size (aka, how many times you run #sin inside #benchLoopSinus) > > You increase (1) to get a more stable result: > > MathBench run: 1 "for debugging". > MathBench run: 100 "will take a long time, but results are more accurate" > > You modify (2) to change the duration of your benchmark, in my silly example > above, the > method is quite small and the benchmark would finish too quickly. Rule of > thumb is to > get the run time of your benchmark (here #benchLoopSinus) in the range of > 10ms and more. > This way you don't have to worry about the timer resolution used to capture > the duration > of your method. > > > Does this answer your question? > > On 2013-09-14, at 08:06, Natalia Tymchuk <natalia.tymc...@unikernel.net> > wrote: >> Hello. >> I have a question about problemSize in benchmarking. I got the small times >> from running benchmarks and that's why I try to use problemSize like in the >> video http://vimeo.com/68494202. But the benchmark for which I rewrote code >> and used problemSize has given me very big result. Maybe it looks like there >> is no division on that problemSize. Am I wrong? What can I do? >> Best regards, >> Natalia >> >> 12.09.13 15:20, Stéphane Ducasse написав(ла): >>> On Sep 11, 2013, at 9:22 PM, Natalia Tymchuk >>> <natalia.moskovc...@unikernel.net> wrote: >>> >>>> Hello Stephane. >>>> Yes, I'm interested in that and it will be an honor for me)). >>> Excellent. >>> If you have a github account let me know and I will add you as a contributor >>> Have a look at >>> >>> >>> https://github.com/SquareBracketAssociates/PharoForTheEnterprise-english/tree/master/Drafts/ >>> >>>> But I never wrote the books and my English is not at its best level. >>>> However I think that after a couple reviews my English will be better . >>> No stress :) >>> My english sucks too and we should not care for now. >>> >>>> Best regards, >>>> Natalia >>> >> >> >