4 ms·
How about random sleeps distributed so that the mean sleep time is always the same for every computation? (and much longer than any likely computation). timer.
by fchollet 12y ago
How about random sleeps distributed so that the mean sleep time is always the same for every computation? (and much longer than any likely computation).
timer.start();
computation();
time = timer.stop();
sleep(random_centered_on(mean-time));
- deleted 12y ago[deleted]
- TheLoneWolfling 12y agoFor one thing, that means that your performance is horrible. And it doesn't prevent against indirect sidechannels. For instance, seeing how long other requests take.