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

  • Time for Rebuilding

    Well, there's nothing like research. Having determined that DDR5 is going to carry a substantial price premium over DDR4 memory for at least a year…

  • Driven Wild

    The studio computer continues to misbehave in various ways. When I fired up Cubase today, I got a lot of nasty, blocky video, despite having cleaned…

  • Some Old Doggerel

    I recall having mangled a CSN tune many years ago on the way to Contraption. Like that convention, the particular co-worker whose code I was digging…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded