in reply to Efficiency of implementation

I did not spend enough time to be sure, but it doesn't look like your matrix is sparse and the indices are integers so ... why hash? An array of arrays would work better and take up less space.

And actually ... why AoA? I think you should be using PDL

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^2: Efficiency of implementation
by BrowserUk (Patriarch) on Feb 01, 2012 at 14:06 UTC
    I think you should be using PDL

    So do I, but despite several attempts to use it, I still wouldn't know where to start.

    And no one ever seems to post any code with their "use PDL" suggestions :(


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      And I thought it's just me and the fact that I was mildly interested, but never actually had a need to use PDL :-(

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.

        And I thought it's just me ...

        Nah. I think there are (probably) many tasks for which PDL would very useful, but the docs are just so impenetrable.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?