C# .Net: Fastest Way to Clear Collections

C# .Net: Fastest Way to clear Collections In this article I’ll investigate different ways to clear out commonly used Collections such as Hashsets, Dictionaries, ConcurrentDictionaries, ArrayLists, and Arrays, benchmarking the results. This will determine in C# .Net: Fastest way to clear Collections. In almost every major C# application, there’s at least one of the following […]


based-on-a-true-story-00045

Dating Women and Dating Games, Part 09

Dating Women and Dating Games, Part 09   WARNING! It’s both Friday the 13th AND a full moon. As a result, this story is probably the most horrific yet, so I have to start out with a warning: this isn’t a bedtime story. Relatively speaking, graphic language, pictures, and descriptions ensue.     Catch up […]


Optimizing SQL Strategies 3

Optimizing SQL Strategies How many of you have come across SQL code that, for whatever reason, wasn’t written as good as it could have been? I’m not talking about going into the inner workings of your database’s engine and milking every possibly nanosecond off the execution plan.   I’m talking about code where you see […]


Woman Walking Home Alone

Mood Killers 4

Mood Killers I was out catching up with some lady friends recently when the conversation, not unexpectedly, turned to sex. I’m all up for some good discussions, debates, and insightful views on the topic. And guys: listening to women talk about sex is a great way to learn what women want sexually. Anyway, one of […]


Dating Women and Dating Games, Part 08 1

Dating Women and Dating Games, Part 08 My epic journey of dating women and dating games continues in this “tale of two people from two cities”: me in Perth; “Lucinda” in Sydney. Opposite sides of the great Australian island-continent. Catch up if you missed the previous installment: http://blogs.davelozinski.com/datingandrelationships/dating-games-part-07 Lucinda and I went through the typical […]

Bitch Slap #2

C# .Net: Fastest Way to count the number of times a character occurs in a string

The Fastest Way to count the number of times a character occurs in a string using C# .Net: This test stemmed from my other test on the fastest way to count the number of times a string occurs within another string (http://blogs.davelozinski.com/curiousconsultant/csharp-net-fastest-way-to-check-if-a-string-occurs-within-a-string). I couldn’t find any native C# methods to do this although other languages […]


C# .Net: Fastest Way to Convert an Int to a String

C# .Net: fastest way to convert an int to a string Here I am going to benchmark several techniques to convert an int to a string.   All C# programmers have to do this at some point. After testing the fastest way to convert a string to an int (http://blogs.davelozinski.com/curiousconsultant/csharp-net-fastest-way-to-convert-a-string-to-an-int), this curious consultant started wondering […]


Dating Games 07 - 1 pawn amongst many

Dating Games, Part 07 1

Dating Games, Part 07 Here’s another story of some behaviour I just couldn’t get my head around. Did you miss the previous entry? This chapter is just weird, so we’ll leave its title as “Please don’t email me again.”   Warning Bells from the Start “Caitlyn” contacted me via email in response to a dating […]


5 More AMAZING Dates

5 More AMAZING Dates I didn’t expect to receive the amount of personal feedback I did from my 5 Amazing Dates (http://blogs.davelozinski.com/datingandrelationships/5-amazing-dates) article! Thank you! The comments I received I think can be broken down into two groups, summed up as follows from these: “I absolutely love the photos!!! And the Toyota date had me […]

5MoreAmazingDates_WeddingDressComingOff

C# .Net: What is the fastest conditional statement?

C# .Net: What is the fastest conditional statement? This will benchmark the C# if-else construct, switch statement, and C# ternary operator (?) to determine which is the fastest in C# .Net.   Most applications have at least one type of conditional statement in its underlying code, whether it’s the if-else construct, switch statement, or the […]