Skip to content
  • Alan Wu's avatar
    46007b88
    A64: Only clear icache when writing out new code (https://github.com/Shopify/ruby/pull/442) · 46007b88
    Alan Wu authored
    Previously we cleared the cache for all the code in the system when we
    flip memory protection, which was prohibitively expensive since the
    operation is not constant time. Instead, only clear the cache for the
    memory region of newly written code when we write out new code.
    
    This brings the runtime for the 30k_if_else test down to about 6 seconds
    from the previous 45 seconds on my laptop.
    46007b88
    A64: Only clear icache when writing out new code (https://github.com/Shopify/ruby/pull/442)
    Alan Wu authored
    Previously we cleared the cache for all the code in the system when we
    flip memory protection, which was prohibitively expensive since the
    operation is not constant time. Instead, only clear the cache for the
    memory region of newly written code when we write out new code.
    
    This brings the runtime for the 30k_if_else test down to about 6 seconds
    from the previous 45 seconds on my laptop.
Loading