Bill Roper (billroper) wrote,
Bill Roper

Faster, Turn Faster...

I've been bashing on the problem of speeding up our calculations here at work. The obvious solution is to perform some type of minimal recalc, so that you don't calculate numbers whose predecessors haven't changed.

But to implement that, you need a dirty flag. And while I had a place to store it for our lineitem variable types, I had no place to store it for the scalar variable types. And while I could have hacked something in, it made more sense to actually rationalize some of the infrastructure around our storage of scalar values so that I can add some new features there later rather than to keep piling things on so that the later conversion would be even more difficult.

That bunch of coding took a couple of weeks. I finished it up on Friday.

Today, I got minimal recalc working. I needed to change the way that we initialize our calculation order so that it was optimized for minimal recalc, but once that was done, the calculations were much faster, as I'd expected that they'd be.

This only helps when you're calculating the same scenario over and over again, but that's a pretty common use case. And it'll do for now. :)
Tags: musings, tech, work

  • The Colder Side of Spring

    It was supposed to be getting warmer for Spring, but the weather appears to have other ideas this week. There's a freeze warning tonight, so I went…

  • Out to Lunch

    Gretchen and I were casting about for something different to have for lunch today. I have been craving a good smoked brisket sandwich and my Internet…

  • Bits and Pieces

    Got up early today for softball practice. The second half was a scrimmage with one of the other local teams, which was a good learning experience for…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded