speed

jQuery scrollTo/localScroll Speed Control?

Hey guys, I'm making a vertically scrolling site, but localScroll is flying by way too fast. Is there a way to control it's speed? Thanks! ...

Check collision speed in Chipmunk Physics

Hello. I'm using Chipmunk 5 for iPhone, with Cocos2D. Upon collision between two specific objects I'd like to run a method which checks the velocity of that collision, if it's over x it runs one set of code, if it's under x it runs another. Now, I understand the basics but I can't work out the code to run a method on collision detecti...

How can I speed up array generations in python?

I'm thinking I need to use numpy or some other library to fill these arrays fast enough but I don't know much about it. Right now this operation takes about 1 second on a quad-core Intel PC, but I need it to be as fast as possible. Any help is greatly appreciated. Thanks! import cv class TestClass: def __init__(self): w = 960 ...

Speed issues with a long script?

I write a lot of bookmarklets and I put them inside a meta-bookmarklet (>20kb so far) thus: var uGlY_vArIaBlE=(function(){ var d=document; var f1=function(){}; var f2=function(){}; … … /* lot of code here */ … var f50=function(){}; }); uGlY_vArIaBlE(); Is it okay for me to assume that f50 will 'know' that d=document as f...

Cache Hotlinked Image To Minimize Server Load

Before anyone rips me a new one...I HAVE PERMISSION to hotlink images from an external site. It works all good, however I don't like that everytime i refresh the page it pulls the images again. My server is running PHP, is there a way to cache the images once, then display them via some local code. I'm really just looking for a way to sp...

optimizing jQuery Selectors - Which is faster?

Are selectors or functions faster in jQuery? Example: $('#something div.else'); // find multiple divs with class .else or $('#something').children('div.else'); I'm trying my best to optimize a page with hundreds of returned elements that seems to hang on a certain crappy computer here in the office (that must use Internet Explore...

Fastest language for FOR loops

Hi- I'm trying to figure out the best programming language for an analytical model I'm building. Primary consideration is speed at which it will run FOR loops. Some detail: The model needs to perform numerous (~30 per entry, over 12 cycles) operations on a set of elements from an array -- there are ~300k rows, and ~150 columns in the...

Download Managers increase download speed

How does the download managers like IDM work? What techniques do they employ to increase the download speed? ...

Video speed is lke 3x normal when I play it in a device...

Thing is, when I test my movie on the iphone simulator, the video speed is ok, but when I play it on the device, an iPhone, the video speed is like 3x faster than normal... This is my code: mMoviePlayer = [ [MPMoviePlayerViewController alloc] initWithContentURL:[self movieURL] ]; mMoviePlayer.moviePlayer.controlStyle = MPMovie...

Is there a way to speed up C++ compilation times in Solaris Sun Studio 12?

Since I am compiling my C++ code on a very server box (32 or 64 cores in total), is there a way of tweaking compiler options to speed up the compilation times? E.g. to tell compiler to compile independent .cpp files using multiple threads. ...

Python function implementations

I've seen various answers to the ball collision detection question explaining why sqrt operations are slow, why absolute value operations are fast on floating ponts etc. How can I find out which operations are expensive and which are not? Basically, I'm looking for a resource where I can learn about the implementation of all the python ...

How can I get the iPhone's current network speed?

I want to get the iPhone's network speed so that I can give user an info when the speed is too slow. ...

Database: Multiple tables or just one table?

For example I have photos and videos tables, I can comment on these, but when I send it to database which way is better? To have 2 tables for comments: photo_comments and video_comments Or to have 1 table comments and create a row inside the table like type and put there if it's a photo_comment or video_comment I think the 1 is faste...

std::vector is very slow?

Here is what I'm doing. I have a class which I instance and it has a std::vector. when I first instance the class this std::vector is empty. The way I use it is I exponentially add to it and clear. Ex: Add a number, clear the vector: Add 2 numbers, clear the vector: Add 3 numbers, clear the vector, Add 4 numbers, clear the vector...

Are sessions faster than querying the database?

So for example, the user is logging in, and the system is storing informations about them example: birth date, so is faster to get this information from the session, or to query the database for it? My idea was, that the user needs to login just once and the session is always there, but If I query the database, then if the user reloads...

Std::vector fill time goes from 0ms to 16ms after a certain threshold?

Here is what I'm doing. My application takes points from the user while dragging and in real time displays a filled polygon. It basically adds the mouse position on MouseMove. This point is a USERPOINT and has bezier handles because eventually I will do bezier and this is why I must transfer them into a vector. So basically MousePos ->...

Multiple std::vectors to fix cache problem?

I have a std::vector<DOUBLEPOINT> I'm making an application with bezier curves and the results are shown in real time. I convert bezier points into a bunch of short lines. I store the coordinates for the small lines in the vector above. Here is my issue:. When the size of my vector exceeds a cache line, things get very slow very fast. I...

Scrolling speed during UITableView re-ordering mode (not performance related)

Is there a way to increase the speed that you can drag a cell up/down during a table's movable row mode of a UITableView? For instance, there seems to be a standard speed that the table will allow you to drag the cell when you are moving it around and the scroll speed seems to increase if you hold it near the top/bottom edge of the devi...

iPhone Objective-C, malloc or NSMutableData?

I'm need to use a volitile block of memory to constantly write and rewrite the data inside using multiple threads. The data will be rendered thread-safe using @synchronized if I utilize either malloc'd data or NSMutableData. My question is what is more recommended for speed? Seeing I'm running recursivly calculated equations on the matr...

In C is it faster to use the standard library or write your own function?

For example, in <ctype.h> there are functions like isalpha(). I want to know if writing an isalpha function on my own is faster than calling isalpha? Thanks for all your instant replies! just want to make clearer to my question: so even for the isalpha function? because you can simply pass a character and check if the character is b...