Performance

My motto when coding is "security first, speed second". So let's see where we can eke out better performance in our code!

First a shout goes out to Nathan who correctly identified my prime number routine as being a re-hash of wheel factorization. It seems that it's a bigger wheel than most people are using, though. Big enough wheel that perhaps this could become the monster truck of prime number calculation. I don't yet know if it will be slower or faster than other implementations, but nonetheless it has been fun to experiment with. Maybe with some luck it could help someone find a prime with 10 million digits, and...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
People have been thinking about prime numbers for over 1700 years, so most of the neat tricks about them have been discovered. I've pondered on a trick that's probably already been thought of, but just in case it hasn't I thought I would blog about it. I actually got the idea for this a couple years ago, but just haven't taken the time to code a proof of concept for it until now. Lately I've been up against the wall with a crazy project at work, and tonight I just wanted to unwind a little and do...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
With careful programming, threads offer a great way to make your application more responsive. If you need to do some database access or call a web service, many millions of computer cycles could go unused before your application actually gets underway again. Instead of making your application sit on the bench that whole time, you may be able to keep it busy with other important tasks. This post offers a simple introduction to spawning your first thread. Here's a couple of lines that will kick off...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Did you know that a laptop can double as a vacuum cleaner? At least that's what it feels like when you go in to clean out the heatsinks around the fan(s), and find what seems like a vaccuum cleaner bag's worth of junk stuffed in there! Especially if you take your machine just about everywhere, the dust stacks up. Mine is nearly constantly on, frequently doing video compression, which spins the fan a bit faster to keep the chip cool. With all the hours of uptime, a bunch of furry lint collects on...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
The postulation of Douglas Engelbart back in 1965 that the complexity of computers would double every 24 months has held true ever since he said it. Although it was originally Engelbart's theory, it was carried to the press by Gordon Moore back in April of 1965, and has thus been famously attributed to him as “Moore's Law“. This means we've seen exponential advances in computing power over the past four decades: (Handy chart of Moore's law from Wikipedia) But is this coming to an end?...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
While teaching the ASP.NET 2.0 class (3201) in Baton Rouge, some questions about performance came up surrounding the new DataSource classes. I had actually meant to get all this testing done and posted by the middle of last week, so for those waiting to see these results, thanks very much for your patience. Altogether this became a fun little experiment, and more time consuming than I expected! I hope you find the results useful. To get started let's review the type of design-time fun we could have...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

News


Welcome to my blog.
Here's what we've got on the menu today:

Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Syndication: