speed

What is the fastest way to parse this string.

I have a string, that is in the following format: [Season] [Year] [Vendor] [Geography] so an example might be: Spring 2009 Nielsen MSA I need to be able to parse out Season and Year in the fastest way possible. I don't care about prettiness or cleverness. Just raw speed. The language is C# using VS2008, but the assembly is being bu...

Performance of RSA based on keysize

Hi, A theoretical question not depending on implementation, how much of a decrease in performance is 1024bit vs 4096bit RSA? Thanks ...

Clock Speed Formula

Guys, Is there a simple way to determine how many milliseconds I need to "Sleep" for in order to "emulate" a 2 mhz speed. In other words, I want to execute an instruction, call System.Threading.Thread.Sleep() function for an X amount of milliseconds in order to emulate 2 mhz. This doesn't need to be exact to the millisecond, but is ther...

Java Program Performance (running time & memory consumption)

Which tools can I use to know the life-time or run-time of a program(from the beginning until the program ends)? I also want to know how much memory that program consumes from start to end. The program is written in Java and I'm running it on Windows XP. ...

Scripting YSlow and/or PageSpeed

As I'm starting to do some front end engineering at work, I would like to properly quantify the speedup achieved. I would like to be able to use an average value of, say, 50 page load times measured by YSlow or Google Page Speed. Obviously, I don't want to hit reload 50 times and write down the value. Is there a FF plugin for that or...

"Pre-warming" the cache with a full, computationally complex page from my Rails app

Hey Everyone, Our initial page load is a beast in our Rails app. The great thing about it is the lack of page refreshes needed. The whole thing is very Ajax-y (and our designers made it look great!) There is only one problem: Initial page load is a monster. I have tweaked and prodded and have eeked out incredible speed improvements b...

What is the fastest language that runs on the JVM

What is the fastest language that runs on the JVM? Scala? Groovy? JRuby? ...

high speed logging using log4net

I am interested in very high speed logging within log4net(around 10K messages per second). to that end i thought of implementing the following modules: protocol buffers based Layout (IRawlayout) - for superior serialization performance shared memory appender and Plugin - to reduce IPC between the logging application and the logging ser...

fastest algorithm to get average change

I have a sorted dictionary where the key is a date and the value is a integer that represents time left. i have 3 years worth of data so it would be something like Key: 2009-1-1, Value: 100 Key: 2009-1-2, Value: 97 Key: 2009-1-3, Value: 92 Key: 2009-1-4, Value: 87 ... ... Key: 2009-1-30, Value: 0 I would like to calculate average chan...

Vector initializing slower than array...why?

I tried 2 things: (pseudo code below) int arr[10000]; for (int i = 0; i < 10000; i++) { for (int j = 0; j < 10000; j++) { arr[j] = j; } } and vector<int> arr(10000); for (int i = 0; i < 10000; i++) { for (int j = 0; j < 10000; j++) { arr[j] = j; } } I ran both the programs and timed it using the "tim...

How to increase deserialization speed?

Serializing/deserializing with BinaryFormatter, resulting serialized file is ~80MB in size. The deserialization takes a few minutes. How could I improve on this? Here's the deserialization code: public static Universe DeserializeFromFile(string filepath) { Universe universe = null; FileStream fs = new FileStream...

Balance between fast and secure: time sensitive password encryption algorithm

I'm working on a client<>server multiplayer game. The authentication is done on the same server as all game logic etc. This means that my authentication password encryption algorithm can't take too much calculation time as it would delay all the other required actions. If many people would logon at the same time that would cause a notice...

XML vs. Array in Flash

In manipulating data in Flash, which data format gives faster speeds in terms of searching and manipulation, XML or nested associative arrays? Meaning I currently send data in strings into the Flash client (I don't want to load an XML file) but I'm not sure if formatting the data into an XML file or into nested associative arrays is bett...

MySQL extremely slow under Snow Leopard

Hi. I've installed MySQL 5.1.40 Source distribution (64-bit executable x86_64) following these instructions by Hivelogic and the mysql (2.8.1) gem using ARCHFLAGS="-arch x86_64" . I'm using it for Ruby on Rails development and my problem is that even if MySQL is working in every way, it is extremely slow. Take this comparison with sql...

Firebird 2.0 transaction SELECT performance

In Firebird 2.0, is using an explicit transaction faster on a SELECT command than executing the command with an implicit one? ...

Help in optimizing a query for a Postgresql database

I'm trying to find some suggestions in optimizing a query that I'm using to fetch a large group of data. The original code that I'm working on looped through a large set of users, and calculated a date range for each one of them. It would then take that date range and query how many questions they answered and how many they got correct...

Is object-oriented PHP slow?

I used to use procedural-style PHP. Later, I used to create some classes. Later, I learned Zend Framework and started to program in OOP style. Now my programs are based on my own framework (with elements of cms, but without any design in framework), which is built on the top of the Zend Framework. Now it consists of lots classes. But th...

Fastest way to write a large file on the iPhone?

This app i'm working on allows the user to take pictures, and saves them locally (a small thumbnail image via Core Data, and the full-size image in the documents directory). I'm finding that writing the image file to the documents directory takes a long time, though -- 8 seconds on my iPhone 3GS, even longer on my iPhone 3G and first-gen...

Calls to webservice are slow, should i be using something else?

Hi, Currently we got a web service up and running that handles all our C.R.U.D calls to our database, and pretty much every interaction between user and the database. (starting with checking the database to see if there's an update for the particular version of the end users application, checking credentials, checking/reading various ot...

How to synchronize and combine results from multiple threads in C++?

I have a data feed continuously feeding data packet in. There are 5 threads(A, B, C, D, E) processing the data packages. Note the 5 threads have totally different speed and they generate 5 different features(each thread generate 1 feature) for every incoming data package. The 5 threads are at different pace: when A has finished analyzin...