[Webkit-unassigned] [Bug 98586] Extend random precision to 53bits

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 6 11:45:10 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=98586





--- Comment #5 from Oliver Hunt <oliver at apple.com>  2012-10-06 11:45:41 PST ---
(In reply to comment #3)
> (From update of attachment 167443 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=167443&action=review
> 
> > Source/JavaScriptCore/ChangeLog:3
> > +        Extend random precision to 53bits
> 
> If this creates an observable benefit, you should be able to write a regression test for it.
> 
> > Source/JavaScriptCore/runtime/WeakRandom.h:71
> > +        uint32_t a = static_cast<uint32_t>(getUint32()) >> 5;
> 
> I think this would be clearer as a uint64_t.
> 
> > Source/JavaScriptCore/runtime/WeakRandom.h:72
> > +        uint32_t b = static_cast<uint32_t>(getUint32()) >> 6;
> 
> I think this would be clearer as a uint64_t.
> 
> > Source/JavaScriptCore/runtime/WeakRandom.h:73
> > +        uint64_t combined = (static_cast<uint64_t>(a) << 26) | b;
> 
> I think it would be clearer just to shift 'a' right by 21 and then left by 32. It's not clear what you're trying to accomplish by removing bits from both values. For example, maybe you think that increases the randomness. But if each bit is random, that's not the case.


That said i'm more concerned about pert, as at one point I did generate 53 bits of randomness, but that got killed due to the pert cost.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list