|
-
May 28th, 2009, 03:46 PM
#1
Tiny little question (Comparer)
I recently found out the Comparer class that can be used to compare two objects that may potentially be null. It runs 3 times faster than any code you can write.
I wonder if there is such class for checking equalities. (I.E. Invoking Equals method instead of CompareTo method)
Also, please share with us on any little known class that exist in the API which we can use avoid writing boiler plate codes.
-
May 28th, 2009, 08:12 PM
#2
Re: Tiny little question (Comparer)
I recently found out the Comparer class that can be used to compare two objects that may potentially be null. It runs 3 times faster than any code you can write.
In what situation have you measured it to be faster and what were you comparing it to? There's no reason why it'd be any faster than anything you could write yourself.
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
May 28th, 2009, 08:21 PM
#3
Re: Tiny little question (Comparer)
It's the end-users' judgments over the speed if they have two code blocks to profile, clearly that the users are not allowed to know anything about the algorithms used to code for each of them means also this is a flawed theory. They still feed their dream anyway and debates go on.
-----
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|