speed

fast way to check if an array of chars is zero

I have an array of bytes, in memory. What's the fastest way to see if all the bytes in the array are zero? ...

iPhone Simulator - SImulate a Slow Connection ?

Is there a way to slow down the internet connection to the iPhone Simulator, so as to mimic how the App might react when you are in a slow spot on the cellular network? ...

Optimize css vs Google page speed is messing with me

I'm using google page speed and it's telling me my css is inefficient... Very inefficient rules (good to fix on any page): * table.fancy thead td Tag key with 2 descendant selectors and Class overly qualified with tag * table.fancy tfoot td Tag key with 2 descendant selectors and Class overly qualified with tag The css rules ar...

Fastest Strategy for Drawing Flash Particles

I am wondering what the fastest approach might be for using Flash/AS3 to render a 2D point plot (sonar lofargram) ; basically screens full of tiny 2D dots using Flash as fast as possible. Any suggestions on where to start? Is Flash capable of displaying 10's of thousands of 2D points (or more) with an acceptable fps? ...

Understanding memory and cpu speed

Firstly, I am working on a windows xp 64 machine with 4gb ram and 2.29 ghz x4 I am indexing 220,000 lines of text that are more or less the same length. These are divided into 15 equally sized files. File 1/15 takes 1 minute to index. As the script indexes more files, it seems to take much longer with file 15/15 taking 40 minutes. My ...

Fastest way to check array items existence in mySQL table

User writes a series of tags (, separated) and posts the form. I build an array containing the tags and delete dupes with array_unique() php function. I'm thinking of doing: go through the array with foreach($newarray as $item) { ... } check each $item for existence in the tags mySQL table if item does not exists, insert into ...

Is there table with timing(cost) of C functions?

Preferable for x86-32 gcc implementation ...

Speeding up a soap powered website

Hi all, We're currently looking into doing some performance tweaking on a website which relies heavily on a Soap webservice. But ... our servers are located in Belgium and the webservice we connect to is locate in San Francisco so it's a long distance connection to say the least. Our website is PHP powered, using PHP's built in SoapCli...

.NET values lookup

Hi, I have a feeling of missing something obvious. UDP receiver application. It holds a collection of valid UDP sender IPs - only guys with IP on that list will be considered. Since that list must be looked at on every packet and UDPs are so volatile, that operation must be maximum fast. Good choice is Dictionary but it is a key-value ...

How do I load the Oracle schema into memory instead of the hard drive?

I have a certain web application that makes upwards of ~100 updates to an Oracle database in succession. This can take anywhere from 3-5 minutes, which sometimes causes the webpage to time out. A re-design of the application is scheduled soon but someone told me that there is a way to configure a "loader file" which loads the schema into...

find out the connected wifi duration,upload and download speed using andorid 1.5api?

Hi, In my application,need to display the upload and download speed and duration of the connected network(wifi).I searched in api found only one method wifiinfo.getLinkSpeed() and a field LINK_SPEED_UNITS.Please give me guidance or sample code. Regards, Rajendar ...

Search relevance from XML docs (XQuery?) vs MySQL

Hello there, I have a website where documents are saved in xml documents, all with the same structure. I need a search engine where I am able to choose documents with the highest relevance according to the key words given by a searching user. I thought it could (?) be a good idea to have one using XQuery rather than having the informa...

How to get REALLY fast python over a simple loop

Edit2: I finally got it to pass at 10.54 seconds. I used nearly all of your answers to get there and thus it was hard to choose one as 'correct' but I believe the one I chose sums it up the best. Thanks to you all. Final passing code is below. Edit: I included some of the suggested updates in the included code. I'm working on a spo...

Does any faster centralized version control than SVN exists?

Hello, I've been using SVN since a long time and now we're trying on Git. I'm not talking on the centralized / decentralized debate here. My only concern is speed. The latter tool is much faster. But sometimes, I NEED to work with a centralized approach, which is much more simple and less complex than the decentralized one. The learnin...

How can I speed-up this loop (in C)?

Hi! I'm trying to parallelize a convolution function in C. Here's the original function which convolves two arrays of 64-bit floats: void convolve(const Float64 *in1, UInt32 in1Len, const Float64 *in2, UInt32 in2Len, Float64 *results) { UInt32 i, j; for (i = 0; i < in1Len;...

PHP fastest method of reading server response

Hi there, im having some real problems with the lag produced by using fgets to grab the server's response to some batch database calls im making. Im sending through a batch of say, 10,000 calls and ive tracked the lag down to fgets causing the hold up in the speed of my application as the response for each call needs to be grabbed. I ...

Jquery UI Tabs, control variable lenght spent on each tab?

I'm trying the following to control the speed of rotation of the tabs but with no luck, any ideas? $('#featured').tabs({ onShow: function(event, ui) { if(ui.index == 0)> { $('#featured').tabs("rotate", 2000, true); } else if(ui.index == 1){ $('#featured').tabs("rotate", 5000, true); } else if(ui.index =...

Cython Speed Boost vs. Usability

I just came across Cython, while I was looking out for ways to optimize Python code. I read various posts on stackoverflow, the python wiki and read the article "General Rules for Optimization". Cython is something which grasps my interest the most; instead of writing C-code for yourself, you can choose to have other datatypes in your p...

Fast iterating over first n items of an iterable (not a list) in python

Hello! I'm looking for a pythonic way of iterating over first n items of an iterable (upd: not a list in a common case, as for lists things are trivial), and it's quite important to do this as fast as possible. This is how I do it now: count = 0 for item in iterable: do_something(item) count += 1 if count >= n: break Doesn't seem ...

Is it possible to write a shell script which is faster to the same script in Perl?

I wrote multiple scripts in Perl and shell and I have compared the real execution time. In all the cases, the Perl script was more than 10 times faster than the shell script. So I wondered if it possible to write a shell script which is faster to the same script in Perl? And why is Perl faster than shell although I use the system functi...