• Toon Verwaest's avatar
    [json] Fold allocation of mutable heap numbers · ba7b25e5
    Toon Verwaest authored
    Instead of allocating a fixed array in which we write individually allocate
    mutable heap numbers, we can allocate a byte array large enough to cover all
    heap numbers. That avoids expensive allocation calls, write barriers, and
    temporary memory O(number of heap numbers) (we'll just have 1 byte empty byte
    array as overhead).
    
    Change-Id: I4ffe16dd91e97a2e8cd8e36ff5af37375599276b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613993
    Auto-Submit: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61581}
    ba7b25e5
json-parser.cc 40.8 KB