﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Thomas Danecker commented on Performance, Joins and why you should always have a profiler</title><description>Where else did you expect to spend the time if not in the code you're executing? Of course, the code in the most inner loop should be as fast as possible, BUT you gain significantly more performance boosts from reducing the count of iterations. The results of the profiler are exactly what I expect to see if I'm profiling such code.
  
  
If you want to optimize your code, I see two chances:
  
- Memorize the joins (e.g. store which rows satisfy your MatchJoinCondition)
  
- Implement your own IEqualityComparer to compare two strings. The string's GetHashCode always generates a hash code involving the whole string. This produces very good hash values but at a cost (proportional to the characters in the string). You may use special information about the strings to create quite good hash values.
</description><link>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment6</link><guid>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment6</guid><pubDate>Wed, 16 Jan 2008 21:48:47 GMT</pubDate></item><item><title>Kiliman commented on Performance, Joins and why you should always have a profiler</title><description>Based on the screenshots, it looks like he's using dotTrace from JetBrains. 
  
  
http://www.jetbrains.com/profiler/index.html
  
</description><link>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment5</link><guid>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment5</guid><pubDate>Mon, 14 Jan 2008 19:28:35 GMT</pubDate></item><item><title>Roger commented on Performance, Joins and why you should always have a profiler</title><description>The very same thing happened to me the other week. We had a loooong running query that we knew took a few minutes. We've been struggling with that query for days and pretty much couldn't get it to execute any faster.
  
  
And... The same happened to us, we had a look using dotTrace and... Voila! Almost 30% of the time was spent inside our GetHashCode method. We fixed that and as a bonus - suddenly a lot of our other queries ran a lot faster because it was implemented in a superclass.
  
</description><link>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment4</link><guid>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment4</guid><pubDate>Mon, 14 Jan 2008 15:43:52 GMT</pubDate></item><item><title>Shawn Wheatley commented on Performance, Joins and why you should always have a profiler</title><description>+1 to the profiler question. We're looking for one where I work as well and I'd love a recommendation.
</description><link>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment3</link><guid>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment3</guid><pubDate>Mon, 14 Jan 2008 15:21:42 GMT</pubDate></item><item><title>Eric Anderson commented on Performance, Joins and why you should always have a profiler</title><description>Yeah, I've been bitten by that type of thing before.  Even though I know I need to run the profiler first, I still get surprised when I see the results.
  
  
As a side note, Rico Mariani has a pretty cool performance oriented blog that deals with some issues like this.  In fact, he's written relatively recently about hash codes.
  
  
For a profiler, I have always used AQTime.  Although from what I've seen, I'm pretty sure I'd be happy with dotTrace as well.
</description><link>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment2</link><guid>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment2</guid><pubDate>Mon, 14 Jan 2008 13:42:31 GMT</pubDate></item><item><title>jonnii commented on Performance, Joins and why you should always have a profiler</title><description>what profiler do you use?
</description><link>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment1</link><guid>http://ayende.com/3098/performance-joins-and-why-you-should-always-have-a-profiler#comment1</guid><pubDate>Mon, 14 Jan 2008 13:12:22 GMT</pubDate></item></channel></rss>