- From: David Bruant <bruant@enseirb-matmeca.fr>
- Date: Thu, 12 Nov 2009 09:49:41 -0800
Boris Zbarsky a ?crit : > On 11/11/09 10:19 PM, David Bruant wrote: >> This attribute have the following properties : >> - It's only dependant on the hardware, the operating system and the >> WebWorker implementation (thus, it is not dynamically computed by the >> user agent at each call and two calls in the same >> hardware//OS//WebWorker implementation have the same result). >> - In the same running conditions (same memory available, same number of >> process running concurrently...) running the "same algorithm" (an easy >> delegation algorithm) has a significantly better performance with >> (navigator.optimalWorkerNumber) workers than >> (navigator.optimalWorkerNumber - 1) workers >> - In the same running conditions, running the same algorithm has no >> significantly better performance with (navigator.optimalWorkerNumber +1) >> workers than (navigator.optimalWorkerNumber) workers > > I believe that these conditions are mutually contradictory. > > Indeed, condition 1 requires that optimalWorkerNumber be a constant > independent of what the browser itself and other applications are doing. => That is what I meant (and still mean) > Condition 2 requires that running with navigator.optimalWorkerNumber > has better performance than running with > (navigator.optimalWorkerNumber - 1) workers. In particular, it > requires that this be the case even if there is already one worker > doing something (due to condition 1). This implies that performance > with (navigator.optimalWorkerNumber+1) workers be better than that > with navigator.optimalWorkerNumber workers, which directly violates > condition 3. => You're perfectly right. I reformulate the definition of "running conditions" (appearing in condition 2 and 3) as : "same memory available, same number of process running concurrently, no other worker running working on the same document". David > > -Boris
Received on Thursday, 12 November 2009 09:49:41 UTC