speed

How to split css-images across multiple subdomains using php?

I wrote a php script to stick in my page just before my main stylesheet. The idea is to split all the background images needed by my page across a few different subdomains so that I can use more than two parallel HTTP requests (latency is horrible from Australia to American hosting). I know that this requires resolving extra DNS lookup...

game speed problem

HI..I made a little game.But this game works on every computer with different speed.I think it is about resolution.I used every thing in paintcomponent.and If I change screen size the game goes slower or faster.And if i run this game on another computer wich has different resolution it also works different. This is my game http://rapidsh...

How to test an iPad app's speed without an iPad when the simulator runs faster?

Title says it all: I have some operations in my iPad app that are CPU-intensive, and I'd really like to be able to test them on the simulator, making sure things will still run smoothly on the actual iPad. Is there any way I can do this? ...

Controlling the fan speed and detecting the inside temperature of the pc with python?

Hello. Since my pc's fan is very loud, I'd like to make myself a program to "shut it up" when it's not required to be running at full speed. I want to make it with python, so is there any module that can detect the temperature and/or set the fan speed? ...

Script Speed vs Memory Usage

I am working on an image generation script in PHP and have gotten it working two ways. One way is slow but uses a limited amount of memory, the second is much faster, but uses 6x the memory . There is no leakage in either script (as far as I can tell). In a limited benchmark, here is how they performed: -------------------------------...

SQL & PHP - Which is faster mysql_num_rows() or 'select count()'?

I'm just wondering which method is the most effective if I'm literally just wanting to get the number of rows in a table. $res = mysql_query("SELECT count(*) as `number` FROM `table1`"); $count = mysql_fetch_result($res,0,'number'); or $res = mysql_query("SELECT `ID` FROM `table1`"); $count = mysql_num_rows($res); Anyone done any d...

Is flexigrid really slow on IE6? What other alternatives can I use?

Hello, Is flexigrid (www.flexigrid.info) really slow on IE6? Client wants me to support IE6, and does not want to use Firefox, because most of their users are using IE6. (NOTE: Flexigrid is much faster in Firefox) What other alternatives can I use? Regards, Geff ...

Increase Query Speed in PostgreSQL

Hello, First time posting here, but an avid reader. I am experiancing slow query times on my database (all tested locally thus far) and not sure how to go about it. The database itself has 44 tables and some of them tables have over 1 Million records (mainly the movies, actresses and actors tables). The table is made via JMDB using the ...

VTD-XML Parsing Performance (speed critical factor). Requesting Feedback/Comments

Hello, I am about to use VTD-XML (found at http://vtd-xml.sourceforge.net/) but I am interested in getting real-case usage feedback, by any one that has used the library and has any comments. At the URL (http://vtd-xml.sourceforge.net/) there are benchmarks but if someone has used VTD-XML and has comments FOR it I would like to hear th...

I'm looking for a way to evaluate reading rate in several languages

I have a software that is page oriented instead of scrollbar oriented so i can easily count the words, but i'd like a way to filter outliers and some default value for the text language (that is known). The goal is from the remaining text to calculate the remaining time. I'm not sure what is the best unit to use. WPM (words per minute)...

std::vector iterator or index access speed question

Just a stupid question . I have a std::vector<SomeClass *> v; in my code and i need to access its elements very often in the program, looping them forward and backward . Which is the fastest access type between those two ? Iterator access std::vector<SomeClass *> v; std::vector<SomeClass *>::iterator i; std::vector<SomeClass *>:...

Basic C++ Speed (initialization vs adding) and comparison speed

I was curious if anyone knows which of the following executes faster (I know this seems like a weird question but I'm trying to shave as much time and resources as possible off my program.) int i=0; i+=1; or int i; i=1; and I also was curious about which comparison is faster: //given some integer i // X is some constant i < X+...

Python if statement efficiency

A friend (fellow low skill level recreational python scripter) asked me to look over some code. I noticed that he had 7 separate statements that basically said. if ( a and b and c): do something the statements a,b,c all tested their equality or lack of to set values. As I looked at it I found that because of the nature of the test...

Fastest way to iterate through an NSArray with objects and keys

Hello, I have an NSArray called 'objects' below with arrayCount = 1000. It takes about 10 secs to iterate through this array. Does anyone have a faster method of iterating through this array? Thanks! for (int i = 0; i <= arrayCount; i++) { event.latitude = [[[objects valueForKey:@"CLatitude"] objectAtIndex:i] floatValue]; event.lon...

C# - Which is the best alternative to ‘switch on type’?

1.) http://channel9.msdn.com/forums/TechOff/411739-switch-objectGetType-/?CommentID=411995 2.) http://blogs.msdn.com/jaredpar/archive/2008/05/16/switching-on-types.aspx 3.) Or is there an even better way....? Please reflect both on speed and ease of reading the code. ...

Faster jquery selector for finding a number of TD elements

I have a table where each row has 13 TD elements. I want to show and hide the first 10 of them when I toggle a link. These 10 TD elements all have an IDs with the prefix "foo" and a two digit number for its position (e.g., "foo01"). What's the fastest way to select them across the entire table? $("td:nth-child(-n+10)") or $("td[id^=...

I'm doing a lot of lists and dictionary sorting...and this is causing memory errors in Python website.

I retrieved data from the log table in my database. Then I started finding unique users, comparing/sorting lists, etc. In the end I got down to this. stats = {'2010-03-19': {'date': '2010-03-19', 'unique_users': 312, 'queries': 1465}, '2010-03-18': {'date': '2010-03-18', 'unique_users': 329, 'queries': 1659}, '2010-03-17': {'date': '20...

Google Chrome Speed Tracer what does Request Timing and Response Timing actually measure?

I'm testing out the Google Chrome Speed Tracer on a few common web pages and taking a look through the results. One thing I'm not sure I understand is what the "Request Timing" and "Response Timing" properties of resources are actually measuring. Initially I thought Request Timing must measure the time from a request for a resource bei...

Looking for a fast hash-function.

Hello, I'm looking for a special hash-function. Let's say I have a large list of strings, if I order them by their hash-values they should be ordered quasi randomly. The most important point is: it must be super fast. I've tried md5 and sha1 and they're using to much cpu power. Clashes are not a problem. I'm using javascript, so it ...

loading files through one file to hide locations

Hello all. Im currently doing a project in which my client does not want to location ( ie folder names and locations ) to be displayed. so I have done something like this: <link href="./?0000=css&0001=0001&0002=css" rel="stylesheet" type="text/css" /> <link href="./?0000=css&0001=0002&0002=css" rel="stylesheet" type="text/css" /> <scri...