performance

Fastest way to separate the digits of an int into an array in .NET?

I want to separate the digits of an integer, say 12345, into an array of bytes {1,2,3,4,5}, but I want the most performance effective way to do that, because my program does that millions of times. Any suggestions? Thanks. ...

Cross language C# and Java development

Can you give me some advice on how to best ensure that two applications (one in C#, the other in Java) will be compatible and efficient in exchanging data? Are there any gotchas that you have encountered? The scenario is point to point, one host is a service provider and the other is a service consumer. ...

MySQL - Not using Index

I'm trying to figure out what I might be doing wrong. This query doesn't seem to be using the index, as its taking way to long. When executing: Explain SELECT a, b, c, d FROM `table` WHERE d = 4013456 id select_type table type possible_keys key key_len ref rows Extra` 1 SIMPLE table ALL...

Is there a way to force Core Animation to run it's thread?

Core Animation uses a background thread to do it's job. Now the problem is this: I have a heavy calculation going on in the main thread. Core Animation immediately freezes until that calculation is done. And then it continues to finish it's animations. I remember reading in a document that CA has a low priority in processing time, meanin...

ExtJS Capable of handling Grids/Datastors of ~1000 elements?

I have a JavaScript application which opens an ExtJS Window, containing an ExtJS TabPanel, which has a tab containing a Data Grid, showing approximately 900 - 1000 rows, each with 7 columns of text fields. The grid may also be filtered to show about 100 rows at a time. When the window opens, navigating to this tab can cause Firefox or Sa...

Ruby Benchmark module: meanings of "user", "system", and "real"?

Experimenting with Ruby's Benchmark module... >> Benchmark.bm(7) { |b| b.report('Report:') { s = '' ; 10000.times { s += 'a' } } } user system total real Report: 0.150000 0.010000 0.160000 ( 0.156361) What are the meanings of "user", "system", and "real"? ...

Is there a Quick Guide on how to use Shark with iPhone to measure performance?

I set it to iPhone/Network mode, but the device never appears anywhere. Connected and running an app through xcode. Do you know a useful tutorial for this? ...

How come the edit post page takes so long to load?

I just setup a new Wordpress blog at home, and no other pages takes forever...I am trying to just add an image to the post, but it is just taking forever...none of the other pages takes so long to load... And i have just optimized all my tables via mysq and a scheduled task, so i don't see why it's taking so long to load... ...

Why does Shark not list my iPod touch in the devices list?

In this answer Brian explained how to connect Shark with the device. I do it exactly this way, but Shark never lists my device. Even if Xcode launches my app on it and the app runs. I get console Logs and everything. It communicates with the mac. But Shark doesn't see it. What could cause this? Snow Leopard, btw... ...

Help with SQL Server Log, Master and TempDB locations on specific array config

I have a quick question that is specific to the server setup we have available to us. We are getting ready to migrate our help desk to a new server, as well as convert a small ACT DB to the full version of SQL 2005 Standard (from SQL Expr.) Right now, we only have the following resources available to us as far as array configurations ...

Is querying for primary keys really worth it?

Jeff Atwood wrote once he found quering database for primary keys, and then getting all relevant fields with an IN clause is double as quick as its single-sql counterpart. I wonder if this applies to all situations, and if not, what are the cases when it still provides significant room for improvement in terms of performance? Furthermo...

Improve this possible 5 joins SQL sentence

Hi everyone, I'm using MySQL 5, and I need to do this sentence to get the results. It's the first attempt when I think about it. I know there are several ways to improve it, but I want to get your opinions first: SELECT p.id, p.image, p.lat, p.lng, p.category_id, p2.title, p2.description, c2.name FROM place p LEFT JOIN place_tr...

C# Number Literals

With this method declaration (no overloads): void Method(double d) { // do something with d } Is there a (performance) difference at runtime between void Main() { Method(1); Method(1.0); } or does the compiler automatically convert the int literal to a double? ...

Is there a way to analyse how a particular Linq-to-objects query will execute?

In the past, I've written Linq to SQL queries that haven't performed well. Using SQL Profiler (or similar) I can look at how my query is translated to SQL by intercepting it at the database. Is there a way to do this with Linq queries that operate solely on objects? As an example, consider the following Linq query on a list of edges i...

Fast exponentiation implementation

Could someone please point out a site where I can find an algorithm to efficiently calculate integer exponentiation to large powers using C#? eg. I want to calculate 2^60000 or 3^12345 ...

Stress and performance test on ASP.NET app

I want to conduct a stress and performance test on the front-end of my ASP.NET app. My goal is to: Identify bottlenecks Learn the number and the load of HTTP requests Easily determine the components that are using an Expires header and/or being gzipped Figure out where to increase download parllelization Locate duplicate scripts and u...

Missing 'DomContentLoaded' and 'load' time information in Firebug's Net Panel.

Hello, Firebug is awesome in reporting the relative time when an HTTP request was made with respect to the 'DomContentLoaded' and 'load' time. However, once the 'load' event occurs (seen by the red line on the timeline), the requests thereafter do not have any information about how later they occurred with respect to the two events. To...

Indexing performance null vs dummy data

I have a table with a InTime and an OutTime column. Normally when I insert data into this table I set the InTime to a DateTime and the OutTime to null. When the data is removed a OutTime value is set. When I’m getting data out for a particular time I use something like: where InTime < sometime and OutTime is > sometime or OutTime is n...

What's the best place for a database-backed, memory-resident global cache in an ASP.NET web server?

I have to cache an object hierarchy in-memory for performance reasons, which reflects a simple database table with columns (ObjectID, ParentObjectID, Timestamp) and view CurrentObjectHierarchy. I query the CurrentObjectHierarchy and use a hash table to cache the current parents of each object for quickly looking up the parent object ID,...

Language performance

Everyday discussions like "C# vs Java performance", "F# vs C# performance", "C vs C++", "native C++ vs C#" always are interesting. Just like idiom.com/~zilla/Computer/javaCbenchmark.html , or mb manageability.org/blog/archive/20030520%23p_the_problem_with_cameron Generally, professional of language A proves that language A is faster tha...