Loading ...
Sorry, an error occurred while loading the content.

80449Re: [XP] Necessary comments?

Expand Messages
  • Robert Blum
    Oct 2, 2003
    • 0 Attachment
      Hi Ron!

      > First some things I'm just wondering about:
      >
      > Does appendChain not have a performance hit over callChain?

      Yes, it does. It copies data around. But...

      > Or is that
      > done in some other thread or something that doesn't matter?

      Since it's copying data, I can use the DMA processor. (Told you the
      environment is DMA-happy!). That means I'm not blowing out any cache
      lines.

      > I understand
      > that you need to scrape every cycle out, but would have thought that
      > the
      > check wasn't very costly at all.

      It wouldn't, if I had full control over the chain and could keep track
      while it's created. Unfortunately, I don't - hence I would have to scan
      the whole chain and follow all calls in there. That means it's quite
      costly. (Especially following the call pointers. Cache misses cost an
      arm and a leg)

      > Anyway, just wondering, not objecting.
      Definitely valid points - it is a strange environment.

      > For a fix, I'd consider renaming or aliasing appendChain (I suppose I
      > couldn't wrap it, that would cost an entire method call oh god)

      You're going to kill me for this.... appendChain is inlined code.
      Because, yes, a method call is hideously expensive. (Compared to other
      architectures, at least)

      > to
      > something like stackSizeUnknownChain().

      I like that. I'm tempted to roll it into a Macro (since the compiler
      can't be trusted with inlining...), and that would be a nice name.

      As a sidebar: Since I can't trust my compiler with inlining, and
      there's a lot of nearly-duplicate code, I'm venturing deeper and deeper
      into the lands of automated code generation. And I like what I'm seeing
      - I can fully test-drive the generators, and any performance anxiety
      for that code can be ignored.

      I'm wondering if that is the path I've been looking for. I can be
      cycle-counting-obsessed, and still write clear, decoupled, fully tested
      code.

      > Just musing ...

      I appreciate you're taking the time.

      - Robert
    • Show all 19 messages in this topic