• svenpanne@chromium.org's avatar
    Implement Math.random() purely in JavaScript. · 2b1da672
    svenpanne@chromium.org authored
    This removes tons of architecture-specific code and makes it easy to
    experiment with other pseudo-RNG algorithms. The crankshafted code is
    extremely good, keeping all things unboxed and doing only minimal
    checks, so it is basically equivalent to the handwritten code.
    
    When benchmarks are run without parallel recompilation, we get a few
    percent regression on SunSpider's string-validate-input and
    string-base64, but these benchmarks run so fast that the overall
    SunSpider score is hardly affected and within the usual jitter. Note
    that these benchmarks actually run even faster when we don't
    crankshaft at all on the main thread (the regression is not caused by
    bad code, it is caused by Crankshaft needing a few hundred microsecond
    for compilation of a trivial function). Luckily, when parallel
    recompilation is enabled, i.e. in the browser, we see no regression at
    all!
    
    R=mstarzinger@chromium.org
    
    Review URL: https://codereview.chromium.org/68723002
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    2b1da672
assembler.h 37 KB