Re: Purpose of defmethod

From: Pascal Costanza (costanza_at_web.de)
Date: 07/13/04

  • Next message: Joerg Hoehle: "Re: MACROLET and lexical environment"
    Date: Tue, 13 Jul 2004 15:12:41 +0200
    
    

    Frode Vatvedt Fjeld wrote:

    > Gareth McCaughan <gareth.mccaughan@pobox.com> writes:
    >
    >>No. The implementation could remember the locations of all calls to
    >>each function, and patch them if the function gets redefined.
    >
    > Is there any implementation that actually does this? If not, what are
    > the decisive reasons for this? (Not a rhetorical question.)

    I am no expert on this topic, but from what I have heard the devil lies
    in the details. For example, if you re-inline a redefined function, the
    code size of the call site changes, jump targets need to be
    recalculated, and so on. Effectively, you need to recompile the call
    site. Now imagine that that call site is currently executed, so you also
    have to recalculate the program counter. This can happen for both other
    threads and the current thread in the general case. Furthermore, if you
    recompile the call site, and that function was again inlined somewhere
    else, you have to do all of these things in turn for its call sites, and
    so on.

    Since this can become very costly, you have to measure at runtime
    whether the cost/benefit ratio is good enough for inlining a function,
    so you need to count function calls and apply appriate heuristics. These
    things depend heavily on the actual CPU, the operating system used, etc.
    I'll stop here. ;)

    Pascal

    -- 
    Pascal Costanza               University of Bonn
    mailto:costanza@web.de        Institute of Computer Science III
    http://www.pascalcostanza.de  Römerstr. 164, D-53117 Bonn (Germany)
    

  • Next message: Joerg Hoehle: "Re: MACROLET and lexical environment"

    Relevant Pages

    • Re: FreeBSD Security Advisory FreeBSD-SA-03:08.realpath
      ... >a) Download the relevant patch... ... >c) Recompile your operating system... ... Once the binary updates are available, FreeBSD Update ...
      (FreeBSD-Security)
    • Re: FreeBSD Security Advisory FreeBSD-SA-03:18.openssl
      ... On Fri, 3 Oct 2003, FreeBSD Security Advisories wrote: ... statically linked against librypto or libssl in the base system? ... from what I can see no API is changed with this patch so wouldn't it be ... possible to recompile libssl/libcrypto and install only them instead of ...
      (FreeBSD-Security)
    • Re: MS Windows & maximized windows
      ... > Hello Matteo, ... > the lisp patch will also help. ... I finally found time to apply the patch. ... Maybe in the week-end I'll find time to apply the C patch and recompile ... ...
      (comp.emacs.xemacs)
    • Re: [Full-Disclosure] Is Mozillas "patch" enough?
      ... >> That's why there should be a way to uninstall the patch, ... > This requires that you have individual patches for each vulnerability, ... > You simply pick the parts you like and recompile your own version. ...
      (Full-Disclosure)