CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Steve Hebert's Development Blog

Steve's Blog - From .Net to dotMath and everything in between.

October 2006 - Posts

  • dotMath 2.0: Stamping out the Inefficiencies (part 1)

    This is the first article in a series leading up to the dotMath 2.0 beta. This release is focused on new speed improvements for dotMath. While introducing an entirely new compile engine, dotMath 2.0 also focuses on backward compatibility to 1.0.

    While dotMath is extremely fast, I’ve found that there is one more factor of 10 speed improvement sitting out there. As a stack-based compiler , making a call to resolve a function is not as efficient as it could be in dotMath. Your entire expression is resolved by nested function calls to manage the execution order. While I’ve mulled the idea of claiming this speed improvement before, on a recent trip I started to question my operating assumptions and came up with a different approach.

    To resolve this, my initial approach involved creating a set of registers and chaining the operations in much the same way program counters and processor registers interact on a conventional piece of code. In this manner, I can claim most of that factor-of-10 speed improvement. After looking at the problem a little deeper, I started to wonder if I can make the evaluation process more efficient than that.

    Take the following simple expression:

          a * b * c * d * e * f * g

    Compiling using a conventional language and calling this expression repeatedly, the entire expression gets evaluated each time. This inefficiency arises primarily because the process of variable storage and subsequent execution are disjointed operations. Since dotMath is controlling both, can we actually make this run faster?

    Yes we can.

    The basic idea is this - we break the processing requirements out into two vectors – one containing the discrete operations (code) and the other containing data (processing values). That said, the data vector not only contains effective register values, but there is one register value per operation. In addition, each variable or static value holds a position within this vector. Because we also maintain the setting of named values AND hold the equation’s dependency graph, we know that by changing the value of “g” in our equation above and requesting a recalc (I am assuming that it has been called at least once before), we only need to perform one calculation instead of six. The performance is now predicated on both the number of terms and the effects of modifying a variable in the equation.

    In our earlier equation, changing the value of “g” results in additional time savings above and beyond the factor-of-10 improvement noted above, whereas modifying the value of “a” leaves us at a factor-of-10 improvement. Even the worst case isn’t bad and certainly worth going after.

    ** dotMath is an expression compiler written entirely in C# and available for download at CodePlex.

  • Friday post: Nerd Fight! Oracle stomps on Red Hat's glasses

    This is truely brilliant (link)- everyone suspected that Oracle would buy up Ubuntu to take over the revenue that Red Hat has been garnering at Oracle's install sites. 

    Instead, Oracle just takes Red Hat's distribution and repackages it. Not only that, they offer the same support services that Red Hat offers with significant discounts.  And then Ellison says,

         "Every time Red Hat comes out with a release, we'll synchronize code."

    Of course they will!  That has to be hall of fame material for the book "In Search of Stupidity".  It's like Ellison is singing a broadway tune:

         "Anything you can ship, I can ship better. I can ship anything better than you."

    Tomorrow, Larry Ellison is going to steal Mathew Szulik's girlfriend for good measure. 

  • dotMath has moved!

    I just finished moving the existing dotMath project to CodePlex.  I'll be putting up links on the existing GotDotNet site shortly.

    I had considered moving dotMath to SourceForge last year due to some hosting problems, but really wanted a more friendly engine that supported release binaries, source control and documentation in a nice presentation. I previously hosted the documentation myself, but the CodePlex Wiki does a great job for this sort of thing. The flexibility is great.

    I will be checking the source code into the the CodePlex SCC as I am readying the next version.

     

  • Game Dev course - online

    Check out Standford's CS248 course - complete with decent notes and powerpoints. There are some decent core concepts especially if you're interested in diving into the XNA beta.

  • Replacing vdproj setups with WiX in Visual Studio

    Rob Mensching discusses replacing the Deployment Projects in Visual Studio with WiX. If you like the idea, check out the blog post and leave a comment.

    I'm checking out the WiX toolkit over at SourceForge now. This would be a tremendous improvement - hopefully they would keep the idea of a GUI creation tool for most common tasks.

  • Agile management discussion - David Anderson's exit interview

    Check out David Anderson's exit interview from Microsoft on Channel 9.  If you want a good overview discussion on Agile management, here it is. 

    I can't wait to read the book that comes out of his Corbis experiences.

     

  • The GPF shrine

    On a recent trip to Bangkok, I got this picture of the "GPF" tower. 

    I'm not exactly sure what company occupies the buliding.  It would be truely great if it turned out to be an insurance company.

     GPF Tower

     

     

  • technorati

  • friday post: Realizing my disconnect with pop culture

    Ok - for the longest time I've thought the following picture on Windows Media Player music service was Steve Erkle (from the early 90's sitcom fame).  It turns out it's Kanye West.

     

  • To Zune or not to Zune - that is the question...

    I preordered a Zune the other night within minutes of Amazon posting it.  My dilemma is that with an 18 hour flight coming up, I need something to listen to music and podcasts.  It looks like I'll jump on the iPod bandwagon for now - not sure if I'll go iPod Video or Nano.

     It would sure be nice if they could partition a portion of the device as a USB drive...  oh well.

More Posts

Our Sponsors