On 08/12/2012 09:08 PM, Patrick J. LoPresti wrote:

> ... I really do think any argument for interceptors based on "speed" is 
> nonsense.

Amdahl's Law says that interceptor speed does matter.  Amdahl's Law also applies
when slowing down operations, as well as when speeding them up.

One paraphrase of Amdahl's Law is, "If you speed up every floating point 
operation
by a factor of 10, then the speed of a whole program will increase by at most 
9%,
because floating point operations tend to contribute at most 10% to the running 
time
of the whole program."

In the other direction, slowing down every floating point operation by a factor
of 20 (and where floating point is 10% of the usual running time) will slow down
the whole program by a factor of 2.9!!  (10% * 20) + ((100% - 10%) * 1) = 290%.
*This* is the really eye-opening application of Amdahl's Law!

In the case at hand, we are interested in string operations, not floating point.
Suppose that stpncpy contributes 0.25% (1/400) of the normal running time.  Then
instruction-by-instruction emulation of stpncpy by memcheck is about 20 * 0.25% 
= 5%
of the normal running time.  This exceeds the common human perception threshold
of 3%.  In contrast, an intercepted (re-directed) stpncpy would be 
imperceptible.

-- 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to