Re: Commit: 5291

From: msevior@physics.unimelb.edu.au
Date: Sun Sep 21 2003 - 18:40:58 EDT

  • Next message: Andrew Dunbar: "Re: commit: partial fix for bug 3862"

    > Martin,
    >
    > my patch replaces
    > - m_pMyBrokenContainer = NULL;
    >
    > with
    >
    > + if(m_pMyBrokenContainer)
    > + m_pMyBrokenContainer = NULL;
    >
    > I check first if m_pMyBrokenContainer is not NULL and then
    > set it to NULL in these cases.
    > The overall effect is exactly the same as before that all
    > m_pMyBrokenContainer are NULL afterwards.
    >
    > The second method is just a bit surprisingly much faster
    > by avoiding writing NULLs to memory locations which already
    > have NULL value.
    >

    Oh, OK. I'm am amazed that asking for two seperate instructions is faster
    that a single assignment and that it makes a measurable difference.

    Something strange in optimizations I guess. By the way, the main issue
    that causes that doc to be so slowly imported are the various table
    manipulations required to import for RTF's radically different model of
    how tables are represented.

    Cheers

    Martin

    > Robert



    This archive was generated by hypermail 2.1.4 : Sun Sep 21 2003 - 18:59:52 EDT