Browse by Tags

All Tags » Benchmarking (RSS)

Array covariance: not just ugly, but slow too

It seems to be quite a long time since I've written a genuine "code" blog post. Time to fix that. This material may well be covered elsewhere – it's certainly not terrifically original, and I've been meaning to post about it for...
Posted by skeet | 24 comment(s)

Optimization and generics, part 2: lambda expressions and reference types

As with almost any performance work, your mileage may vary (in particular the 64-bit JIT may work differently) and you almost certainly shouldn't care. Relatively few people write production code which is worth micro-optimizing. Please don't take...
Posted by skeet | 17 comment(s)
Filed under: , ,

Optimization and generics, part 1: the new() constraint (updated: now with CLR v2 results)

As with almost any performance work, your mileage may vary (in particular the 64-bit JIT may work differently) and you almost certainly shouldn't care. Relatively few people write production code which is worth micro-optimizing. Please don't take...
Posted by skeet | 14 comment(s)
Filed under: , ,

LINQ To Objects and the performance of nested "Where" calls

This post came out of this Stack Overflow question, which essentially boils down to which is better out of these two options: var oneBigPredicate = collection.Where(x => Condition1(x)                                         ...
Posted by skeet | 18 comment(s)
Filed under: , ,

There's a hole in my abstraction, dear Liza, dear Liza

I had an interesting day at work today. I thought my code had broken... but it turns out it was just a strange corner case which made it work very slowly. Usually when something interesting happens in my code it's quite hard to blog about it, because...
Posted by skeet | 16 comment(s)

Revisiting randomness

Almost every Stack Overflow question which includes the words "random" and "repeated" has the same basic answer. It's one of the most common "gotchas" in .NET, Java, and no doubt other platforms: creating a new random...

Buffering vs streaming benchmark: first results

My poor laptop's had a busy weekend. It's run 72 tests, rebooting between each test. Most of these tests have kept both the CPU and disk busy for a lot of the time. I expect to update this blog post with more numbers - and possibly more strategies...
Posted by skeet | 11 comment(s)

Benchmarking IO: buffering vs streaming

I mentioned in my recent book review that I was concerned about a recommendation to load all of the data from an input file before processing all of it. This seems to me to be a bad idea in an age where Windows prefetch will anticipate what data you need...
Posted by skeet | 24 comment(s)

Benchmarking: designing an API with unusual goals

In a couple of recent posts I've written about a benchmarking framework and the results it produced for using for vs foreach in loops . I'm pleased with what I've done so far, but I don't think I've gone far enough yet. In particular...
Posted by skeet | 8 comment(s)