Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Standup 11/12/2009: Global method cache invalidation

Interesting Thing

  • Dynamic use of Object#extend at runtime invalidates the global method cache, causing performance degradations. Consider a design that makes use of extend at class parse time. Here’s a slide deck that explains in detail:
    What Makes Ruby Go

  1. Mark Wilden says:

    The slide deck is deeply unconvincing.

    The authors compare running a standard benchmark with and without method caching. But Object#extend doesn’t turn off method caching for all time–just once for each method.

    Then they call Object#extend six million times in a tight loop. If you’re writing code like that, then you’ve got far bigger problems than method caching.

    They don’t actually present any real-world situation to support the impression that Object#extend should be avoided for performance reasons.

    That said, the slides were very interesting, and other points they make further on do have practical applications.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *