Rico Mariani's Performance Tidbits
Implying no warranties and conferring no rights: "AS IS" since 1988
Browse by Tags
All Tags
»
quiz
»
performance
(RSS)
databases
design advice
signatures
using tools
Performance Quiz #13 -- Linq to SQL compiled query cost -- solution
14 January 08 09:51 AM
|
ricom
|
18 Comments
Well is there really a "solution" at all in general? This particular case I think I constrained enough that you can claim an answer but does it generalize? Let's look at what I got first, the raw results are pretty easy to understand. The experiment I
Read More...
Performance Quiz #13 -- Linq to SQL compiled queries cost
11 January 08 12:08 PM
|
ricom
|
28 Comments
I've written a few articles about Linq now and you know I was a big fan of compiled queries in Linq but what do they cost? Or more specifically, how many times to you have to use a compiled query in order for the cost of compilation to pay for itself?
Read More...
Performance Quiz #12 -- The Cost of a Good Hash -- Solution
26 January 07 10:01 AM
|
ricom
|
6 Comments
Well once again there have been many thoughtful replies to both the original question as well as the followup with hints. Recall the original question asked a bit of trivia: could you name 5 implementations of GetHashCode in the framework that do things you might not expect to see in a hash function? It's a little bit of a vague question and also requires a good deal of arcane knowledge of the CLR. The most interesting thing about the discussion I think is just what people considered "unusual." But as always there was a method to my madness. So without further ado here's my list of "unusual" hash functions, there are 53 of them.
Read More...
Performance Quiz #12 -- The Cost of a Good Hash -- Some Help
24 January 07 11:30 AM
|
ricom
|
32 Comments
I continue to be astounded by what my readers can come up with. As usual I had a purpose for posing my last question and that purpose was to show that basically its hard to get a handle on what things cost in any kind of omnibus way. But imagine my surprise
Read More...
Performance Quiz #12 -- The Cost of a Good Hash
22 January 07 11:38 AM
|
ricom
|
28 Comments
This quiz is a little bit different than some of my others. Here is System.String.GetHashCode public override unsafe int GetHashCode() { fixed (char* text1 = ((char*) this)) { char* chPtr1 = text1; int num1 = 0x15051505; int num2 = num1; int* numPtr1
Read More...
Performance Quiz #11: Ten Questions on Value-Based Programming : Solution
07 September 06 02:52 PM
|
ricom
|
11 Comments
In my last quiz I asked a few questions about a few hypothetical classes that might appear in a value-rich context. I styled my example in the form of some graphics library classes but the idea is a general one. Many contexts can and should be rich in
Read More...
Performance Quiz #11: Ten Questions on Value-Based Programming
31 August 06 11:23 AM
|
ricom
|
22 Comments
Some of you have probably heard one or more of my talks, or read the annotations I made in the Design Guidelines . If you have then you already know that I don't always agree with every suggested guideline. Especially not in every context. It's probably
Read More...
Performance Quiz #10 -- Thread local storage -- Solution
18 July 06 04:25 PM
|
ricom
|
6 Comments
I actually posted quiz #10 quite a while ago but a comment with the correct solution came in so quickly that I wasn't very motivated to post a followup. There are excellent links in the comments (thank you readers!) But now I'll have to make the quizzes
Read More...
Performance Quiz #10 -- Thread local storage
16 June 06 12:55 PM
|
ricom
|
8 Comments
It's time for another quiz! A very short one this time. If I need some thread local storage and I might need several entries should I use: Thread.GetData(slot) and Thread.SetData(slot, object) or should I make my own static member like this [ThreadStatic]
Read More...
Performance Quiz #9 -- extra innings due to dispatch stubs
21 March 06 05:37 PM
|
ricom
|
1 Comments
Well you'll recall that in the Performance Quiz #9 solution there was a surprising result where Test7 was actually faster than Test5 even though they appear to be doing basically exactly the same work. So my new challenge to you was to see if you can
Read More...
Performance Quiz #9 : IList<T> List and array speed -- solution
12 March 06 09:46 AM
|
ricom
|
8 Comments
Last week I posted Performance Quiz #9 for discussion. Well the comments have been just awesome and many people went right ahead and measured the results. Some of you have discovered the key point in this particular test: Arrays are magic. In the test
Read More...
Performance Quiz #9 : IList<T> List and array speed
09 March 06 07:31 PM
|
ricom
|
34 Comments
A short and sweet quiz with lots of juicy discussion possibilities: public int Sum( IList < ushort > indices) { int result = 0; for ( int i = 0; i < indices.Count; i++) result += indices[i]; return result; } Considering only the time it takes
Read More...
Performance Quiz #8 -- The problems with parsing -- Part 5
30 November 05 11:32 AM
|
ricom
|
6 Comments
And today we conclude our little saga with one final experiment, a little analysis and some comments. I hope you've enjoyed reading this series as much as I've enjoyed doing the experiments. First, as promised I created yet another version of this little
Read More...
Performance Quiz #8 -- The problems with parsing -- Part 4
29 November 05 11:48 AM
|
ricom
|
5 Comments
In my last posting I made some recommendations about how to drastically improve the evaluation process based on the key observations that even the basic operations required to evaluate the truth of the facts were quite costly -- more so than all of the
Read More...
Performance Quiz #8 -- The problems with parsing -- Part 3
28 November 05 11:53 AM
|
ricom
|
8 Comments
The thing about performance work is that it's very easy to be fooled into looking into the wrong areas. That's why you want your changes to be firmly grounded in data whenever they can be. Or if you're planning, you want to be thinking about what your
Read More...
More Posts
Next page »
Search
This Blog
Home
Email
Tags
databases
debuggers
design advice
History of Visual Studio
locking
performance
quiz
ramblings
recommendations
signatures
using tools
visual studio
Archives
December 2009 (1)
October 2009 (13)
September 2009 (2)
August 2009 (1)
June 2009 (3)
May 2009 (3)
December 2008 (1)
November 2008 (4)
September 2008 (2)
August 2008 (6)
June 2008 (2)
May 2008 (2)
February 2008 (2)
January 2008 (2)
November 2007 (5)
October 2007 (2)
September 2007 (3)
August 2007 (3)
July 2007 (3)
June 2007 (6)
May 2007 (1)
April 2007 (2)
March 2007 (1)
February 2007 (5)
January 2007 (7)
December 2006 (2)
November 2006 (1)
September 2006 (4)
August 2006 (4)
July 2006 (11)
June 2006 (3)
May 2006 (5)
April 2006 (6)
March 2006 (6)
February 2006 (2)
January 2006 (2)
December 2005 (2)
November 2005 (5)
October 2005 (4)
September 2005 (4)
August 2005 (6)
July 2005 (2)
June 2005 (3)
May 2005 (12)
April 2005 (3)
March 2005 (5)
February 2005 (2)
January 2005 (3)
December 2004 (2)
November 2004 (2)
October 2004 (3)
September 2004 (4)
August 2004 (3)
July 2004 (4)
June 2004 (8)
May 2004 (6)
April 2004 (4)
March 2004 (8)
February 2004 (4)
January 2004 (3)
December 2003 (11)
Performance
Wiki: Perf Wiki Root
Wiki: Perf Articles
Wiki: Class Comments
Syndication
RSS 2.0
Atom 1.0