performance

Unit test execution speed (how many tests per second?)

What kind of execution rate do you aim for with your unit tests (# test per second)? How long is too long for an individual unit test? I'd be interested in knowing if people have any specific thresholds for determining whether their tests are too slow, or is it just when the friction of a long running test suite gets the better of you?...

What is good server performance monitoring software for Windows?

I'm looking for some software to monitor a single server for performance alerts. Preferably free and with a reasonable default configuration. Edit: To clarify, I would like to run this software on a Windows machine and monitor a remote Windows server for CPU/memory/etc. usage alerts (not a single application). Edit: I suppose its not n...

How to overload std::swap()

std::swap() is used by many std containers (such as std::list and std::vector) during sorting and even assignment. But the std implementation of swap() is very generalized and rather inefficient for custom types. Thus efficiency can be gained by overloading std::swap() with a custom type specific implementation. But how can you impleme...

Good Resources for Relational Database Design

I'm looking for a book/site/tutorial on best practices for relational database design, tuning for performance etc. It turns out this kind of resource is a bit difficult to find; there's a lot of "here's normalization, here's ER diagrams, have at it," but not much in the way of real examples. Anyone have any ideas? ...

In .NET, will empty method calls be optimized out?

Title says it all, given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking? Since I'm sure it'll be asked, the reason for the empty method is a preprocessor directive. ...

PHP performance

What can I do to increase the performance/speed of my PHP scripts without installing software on my servers? ...

Interpreted languages - leveraging the compiled language behind the interpreter

If there are any language designers out there (or people simply in the know), I'm curious about the methodology behind creating standard libraries for interpreted languages. Specifically, what seems to be the best approach? Defining standard functions/methods in the interpreted language, or performing the processing of those calls in the...

64bit .NET Performance tuning

I know that .NET is JIT compiled to the architecture you are running on just before the app runs, but does the JIT compiler optimize for 64bit architecture at all? Is there anything that needs to be done or considered when programming an app that will run on a 64bit system? (i.e. Will using Int64 improve performance and will the JIT com...

How to organize dataset queries to improve performance

I don't know when to add to a dataset a tableadapter or a query from toolbox. Does it make any difference? I also dont know where to create instances of the adapters. Should I do it in the Page_Load? Should I just do it when I'm going to use it? Am I opening a new connection when I create a new instance? This doesn't seem ...

Identifying SQL Server Performance Problems

We're having sporadic, random query timeouts on our SQL Server 2005 cluster. I own a few apps that use it, so I'm helping out in the investigation. When watching the % CPU time in regular ol' Perfmon, you can certainly see it pegging out. However, SQL activity monitor only gives cumulative CPU and IO time used by a process, not what it's...

How do I display database query statistics on Wordpress site?

I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like: 23 queries. 0.448 seconds I was wondering how this is accomplished. Is it through the use of a particular Wordpre...

How do I track down performance problems with page rendering?

I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin Render and End Render is 1.4 seconds. From MSDN I see that All ASP.NET Web server...

Can you really build a fast word processor with GoF Design Patterns?

The Gang of Four's Design Patterns uses a word processor as an example for at least a few of their patterns, particularly Composite and Flyweight. Other than by using C or C++, could you really use those patterns and the object-oriented overhead they entail to write a high-performing fully featured word processor? I know that Eclipse ...

Optimizing a search algorithm in C

Can the performance of this sequential search algorithm (taken from The Practice of Programming) be improved using any of C's native utilities, e.g. if I set the i variable to be a register variable ? int lookup(char *word, char*array[]) { int i for (i = 0; array[i] != NULL; i++) if (strcmp(word, array[i]) == 0) ...

Choosing a multiplier for a (string) hash function

Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string. ...

Difference between a byte array and MemoryStream

Howdy, I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors. Is there an advantage to holding the file as a stream, either MemoryStream or FileStream, or should it be converted ...

Experience with Hadoop?

Hi, Have any of you tried Hadoop? Can it be used without the distributed filesystem that goes with it, in a Share-nothing architecture? Would that make sense? I'm also interested into any performance results you have... ...

RDF storage

Has someone experiment RDF storage solution like sesame ? I'm looking for performance review of this kind of solution compared to the traditional database solution. ...

Best traffic / performance / usage monitoring module?

Are there any open source (or I guess commercial) packages that you can plug into your site for monitoring purposes? I'd like something that we can hook up to our ASP.NET site and use to provide reporting on things like performance over time, vs current load, page traffic, SQL performance, CPU time monitoring Ideally in c# :) With som...

SQL - What are your favorite performance tricks?

When you have a query or stored procedure that needs performance tuning, what are some of the first things you try? ...