Sign In
Fabulous Adventures In Coding
Eric Lippert's Blog
Tags
Aargh! (8)
accuracy (6)
Arrays (8)
ASP (11)
AStar (5)
Async (15)
bad jokes (14)
Begging the question (4)
Benford's Law (3)
Best Of FAIC (12)
Big Words (5)
Books (23)
Breaking Changes (24)
Brittle Base Classes (6)
C# (327)
C# 4.0 (39)
C# 5.0 (10)
Cargo Cult Programming (4)
cast operator (3)
Channel 9 (6)
Charts (6)
closures (3)
Code Generation (10)
Code Quality (29)
COM Programming (57)
Conditional Operator (3)
Continuation Passing Style (11)
Conversions (16)
Covariance and Contravariance (22)
customer service (4)
declaration spaces (5)
definite assignment (3)
Dialogue (14)
English Usage (11)
exception handling (9)
Floating Point Arithmetic (15)
grammars (9)
graph colouring (5)
GUIDs (4)
Hashing (9)
High Dimensional Spaces (5)
Immutability (27)
integer arithmetic (5)
Interviewing (8)
Introduction (6)
It Hurts When I Do This (5)
Iterators (10)
JScript (93)
JScript .NET (29)
keywords (4)
Lambda Expressions (20)
Language Design (62)
local variables (3)
localization (3)
Mathematics (18)
Memory Management (13)
Metablogging (9)
Mistakes (6)
Music (6)
myths (7)
namespaces (5)
Non-computer (37)
Optional arguments (5)
Overload Resolution (9)
Pages (25)
Performance (48)
precedence (4)
precision (7)
protected (7)
Puzzles (49)
quotable quotations (4)
Rants (51)
Rarefied Heights (52)
reachability (4)
Recursion (26)
reference (4)
Regular Expressions (13)
Relationships (4)
Salt (4)
Science (12)
scope (5)
Scripting (189)
Security (47)
shadowcasting (6)
SimpleScript (30)
Software development methodology (13)
Static Methods (6)
Threading (18)
Topological Sort (4)
Type Inference (18)
type safety (4)
unsafe code (4)
Value Types (11)
VBScript (80)
Video (12)
virtual dispatch (9)
VSTO (10)
warnings (5)
What's The Difference? (11)
Zombies (4)
Browse by Tags
MSDN Blogs
>
Fabulous Adventures In Coding
>
All Tags
>
performance
Tagged Content List
Blog Post:
String interning and String.Empty
Eric Lippert
Here's a curious program fragment: object obj = "Int32"; string str1 = "Int32"; string str2 = typeof(int).Name; Console.WriteLine(obj == str1); // true Console.WriteLine(str1 == str2); // true Console.WriteLine(obj == str2); // false !? Surely if A equals B, and B equals C, then A equals C; that...
on
28 Sep 2009
Blog Post:
The Stack Is An Implementation Detail, Part One
Eric Lippert
" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; BORDER-RIGHT-WIDTH: 0px" height=240 alt="Stack " src="http://blogs.msdn.com/blogfiles/ericlippert/WindowsLiveWriter/TheStackIsAnImplementationDetail_C978/Stack_thumb_1...
on
27 Apr 2009
Blog Post:
Representation and Identity
Eric Lippert
(Note: not to be confused with Inheritance and Representation .) I get a fair number of questions about the C# cast operator. The most frequent question I get is: short sss = 123; object ooo = sss; // Box the short. int iii = (int) sss; // Perfectly legal. int jjj = (int) (short) ooo; // Perfectly...
on
19 Mar 2009
Blog Post:
Santalic tailfans, part two
Eric Lippert
As I have said before many times , there is only one sensible way to make a performant application. (As an aside: perfectly good word, performant, deal with it!) That is: Set meaningful, measurable, customer-focused goals. Write the code to be as clear and correct as possible. Carefully measure your...
on
6 Feb 2009
Blog Post:
A nasality talisman for the sultana analyst
Eric Lippert
The other day my charming wife Leah and I were playing Scrabble Brand Crossword Game (a registered trademark of Hasbro and Mattel) as is our wont. I went first, drawing the Q and a bunch of vowels. Knowing that the Q is death to hold onto, I immediately opened with QI for 22 points. I silently thanked...
on
4 Feb 2009
Blog Post:
Arrays considered somewhat harmful
Eric Lippert
I got a moral question from an author of programming language textbooks the other day requesting my opinions on whether or not beginner programmers should be taught how to use arrays. Rather than actually answer that question, I gave him a long list of my opinions about arrays, how I use arrays, how...
on
22 Sep 2008
Blog Post:
Trivial Projections Are (Usually) Optimized Away
Eric Lippert
OK, computers aren't entirely dumb when it comes to LINQ. Here's an example of a place where we're a bit smarter. Consider the following query: IEnumerable<int> query = from n in number_array orderby n select n; Does this get transformed by the compiler into IEnumerable<int> query...
on
12 May 2008
Blog Post:
Computers are dumb
Eric Lippert
A few short takes today, from questions I've received recently about LINQ in C# 3.0. The first question was " in the following code, does it really check every single non-negative integer, or does it use the knowledge that once you're beyond ten, you can stop iterating? " var smallNumbers = Enumerable...
on
9 May 2008
Blog Post:
Lambda Expressions vs. Anonymous Methods, Part Five
Eric Lippert
Last time I demonstrated that the compiler could have to do an exponential number of bindings in order to determine whether there was a unique best overload resolution for a function call that takes a lambda. Some of you may have wondered whether we simply were not being clever enough in the compiler...
on
28 Mar 2007
Blog Post:
Lambda Expressions vs. Anonymous Methods, Part Four
Eric Lippert
Hey all, sorry for the long time between posts; I have been crazy busy recruiting , interviewing, fixing bugs, making performance improvements and implementing last-minute changes to the language and expression tree library. The last few posts about lambda binding yielded many interesting comments which...
on
26 Mar 2007
Blog Post:
250% of what, exactly?
Eric Lippert
I just got a question this morning about how to take two collections of items and determine how many of those items had the same name. The user had written this straightforward but extremely slow VBScript algorithm: For Each Frog In Frogs For Each Toad In Toads If Frog.Name = Toad.Name Then SameName...
on
1 Sep 2005
Blog Post:
Caching Dispatch Identifiers Is A Bad Idea
Eric Lippert
About two years ago I wrote a bit about when it was legal to cache a dispatch identifier so that you didn’t have to look it up a second time . I was reminded of this today because the scripting sustaining engineering team was working on a bug that involved a customer incorrectly caching a dispatch identifier...
on
24 Aug 2005
Blog Post:
Scripting Type Library Constant Injection Performance Characteristics, Part Three
Eric Lippert
We’ve got a system that meets all our needs for disambiguating hierarchical constants through partial or full qualification. (In the event of a collision between an enumerated type name and a value in a given library, the type name wins so that full qualification can work.) But what about the performance...
on
7 Jul 2005
Blog Post:
Scripting Type Library Constant Injection Performance Characteristics, Part Two
Eric Lippert
Script developers can declare constants, variables, functions and classes at global scope by writing the appropriate lines of code. Script hosts (Internet Explorer, ASP, WSH, etc) however can only add objects to the script engine’s global scope. For practical purposes, it’s as though the host creates...
on
29 Jun 2005
Blog Post:
Scripting Type Library Constant Injection Performance Characteristics, Part One
Eric Lippert
(Sorry about the title. I work for Microsoft; we like nouns .) Over a year ago now a reader noted in a comment to this posting that defining named constants using Const in VBScript or var in JScript is way, way faster than importing a type library. My empirical JScript testing showed that loading...
on
22 Jun 2005
Blog Post:
High-Dimensional Spaces Are Counterintuitive, Part Five
Eric Lippert
All of this stuff about high dimensional geometry has been known for quite a while. The novel bit that this paper is all about is how to actually build a fast index for searching a high-dimensional space where the query has a strong likelihood of being junk . The idea that these smart Microsoft researchers...
on
20 Jun 2005
Blog Post:
High-Dimensional Spaces Are Counterintuitive, Part Four
Eric Lippert
It's reasonably common to have a database containing a few thousand or million points in some high-dimensional space. If you have some "query point" in that space you might like to know whether there is a match in your database. If you're looking for an exact match then the problem is pretty easy --...
on
9 Jun 2005
Blog Post:
High-Dimensional Spaces Are Counterintuitive, Part Three
Eric Lippert
My next book project is ready for copyediting, the wedding invitations are sent out, my bug count is under control, I've got a layer of levelling compound poured in the basement, there's no more ivy on my roof, and I’m rigging my sailboat some time this week (about six weeks later than I would have liked...
on
6 Jun 2005
Blog Post:
High-Dimensional Spaces Are Counterintuitive, Part Two
Eric Lippert
The volume of an n-cube of edge length s is easy to work out. A 2-cube has s 2 units of area. A 3-cube has s 3 units of volume. A 4-cube has s 4 units of 4-volume, and so on -- an n-cube has s n units of n-volume. If the n-cube has edge of s>1, say s=2, then clearly the n-volume dramatically increases...
on
13 May 2005
Blog Post:
High-Dimensional Spaces Are Counterintuitive, Part One
Eric Lippert
A friend of mine over in Microsoft Research pointed out to me the other day that high-dimensional spaces are really counterintuitive. He'd just attended a lecture by the research guys who wrote this excellent paper and we were geeking out at a party about it. I found this paper quite eye-opening and...
on
11 May 2005
Blog Post:
How To Obtain The Name Of The Client From The ASP Server
Eric Lippert
Here's a question about client side vs. server side scripting that I got recently: I want to get the machine name of the client the request is being made from. With ASP I can get the IP address using this code: ipaddr = Request.ServerVariables("REMOTE_ADDR") But I don’t know how to get the name of...
on
9 May 2005
Blog Post:
Google Desktop On The Cheap Part One: Nope, That Doesn't Work
Eric Lippert
So, how many files are we talking about here? I've got over thirty thousand source code files containing over seven million unique words. There are pretty much two kinds of words -- words that occur in one, two, a dozen files, and words that occur in almost every file. ("Microsoft", "next", etc.) An...
on
20 Oct 2004
Blog Post:
Google Desktop On The Cheap, Part Zero
Eric Lippert
Before I get started with my next series, two quick notes. First, at long last I had dinner with famed JOS poster (and east coast technical evangelist for my product, VSTO) Philo the other night, as he happened to be in Redmond. I'm pleased to report that he's as witty, urbane and opinionated in real...
on
18 Oct 2004
Blog Post:
Aargh! Part Eight, plus Boring Metablogging
Eric Lippert
Q: What's a pirate's second favourite mode of transportation? A: A caaaaargh! Preferably a Jaguaaaaargh, but an early Oldsmobile Cutlass will do. Q: Very amusing -- but what's a pirate's favourite mode of transportation? A: A pirate ship, silly. Gripe #10: Don't use _alloca _alloca allocates...
on
23 Jul 2004
Blog Post:
Recursion and Dynamic Programming
Eric Lippert
Back in May we were discussing the merits and drawbacks of recursive programming techniques -- that is, writing functions which break down problems into sub-problems, and then call themselves. The drawback of such an approach is that in some cases, you end up doing way more work than necessary...
on
21 Jul 2004
Page 1 of 2 (48 items)
1
2