optimization

Optimization vs Alt Text - Can I have both?

Hi, I have a small problem developing/optimizing a web page. I know it is good to have an ALT text for images. I had a set of 10 small images and alt-text for each. Note that there is a pressing need to make sure the first time visitor saw the website as quickly as possible. But I thought, 10 HTTP requests? So, what I did was, combine...

Optimizations in Code related to string functions!

Hi All, Are there any guidelines available that can be followed before calling standard string operation related functions in C? For example, how much optimization will comparing the first character of two strings (and checking if they are equal) before calling strcmp provide? What types of overhead related to string related functions...

mysql: which queries can untilize which indexes?

I'm using Mysql 5.0 and am a bit new to indexes. Which of the following queries can be helped by indexing and which index should I create? (Don't assume either table to have unique values. This isn't homework, its just some examples I made up to try and get my head around indexing.) Query1: Select a.*, b.* From a Left Join b on b.type...

Optimize Code by using yield or changing algorithm

The code below works but I want to optimize the code using yield or by changing algorithm. public IEnumerable<Book> GetAuthorWithBookName(string keyword) { var bookAndAuthorList = new List<Book>(); List<Author> AuthorNameList = getAuthorName(keyword); foreach (var author in AuthorNameList) { XmlNode booksNames = ...

Jython Optimizations

Are their any ways to optimize Jython without resorting to profiling or significantly changing the code? Specifically are there any flags that can be passed to the compiler, or code hints in tight loops. ...

Is using instanceof operator in javascript a performance issue?

I have heard that instanceof operator in java is a performance issue, Is it true for Javascript too (IE6,IE7,IE8,FF,Chrome,safari,etc.)? any links to authentic papers would be helpful. ...

What's a good convex optimization library?

I am looking for a C++ library, and I am dealing with convex objective and constraint functions. ...

Is Loop Hoisting still a valid manual optimization for C code?

Using the latest gcc compiler, do I still have to think about these types of manual loop optimizations, or will the compiler take care of them for me well enough? ...

joomla performance

hi i had a very noob question for site speed point of view which method is more effective caching or reducing http request .I am using smartoptimizer for the caching ,Gzip and for minify purpose , I have a doubt in my mind related with caching issue ,which one is best default joomla cache or smartoptimizer when i used both i got 404 er...

Execution times for various RDBMS queries?

Is there some reliable (i.e. acknowledged) data on the execution times for various queries, such as different types of joins, scans, with different types and size of data? I am looking for the order of magnitude. This does not have to be vendor-specific data. It should be similar in terms of presentation for latency for various access t...

Background script on shared host with multiple PHP versions installed

I was needing a way to generate thumbnails (using PHP5) for an image management script and had a problem where my host has multiple versions of PHP installed (4 and 5), with PHP4 set as default. This meant that any calls to php from the CLI would run PHP4. I've come up with the following as what I hope to be a cross platform solution. I'...

How does the C# compiler optimize a code fragment?

If I have a code like this for(int i=0;i<10;i++) { int iTemp; iTemp = i; //......... } Does the compiler instantinate iTemp 10 times? Or it optimize it? I mean if i rewrite the loop as int iTemp; for(int i=0;i<10;i++) { iTemp = i; //......... } Will it be faster? ...

How does C# 3.0 jagged array performance optimization vs. rectangular arrays work ?

Hi, In the Apress book "Illustrated C# 2008", pg. 343 notes: "One-dimensional arrays have specific instructions in the CIL that allow them to be optimized for performance. Rectangular arrays do not have these instructions...Because of this, it can sometimes be more efficient to use jagged arrays..." Does anyone know how these pe...

In VB 2008, why does manipulation of shorts take longer than integers?

In this example: Sub Button1_Click(sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim stopwatch1, stopwatch2 As New Stopwatch : Dim EndLoop As ULong = 10000 stopwatch1.Start() For cnt As ULong = 1 To EndLoop Dim Number1 As UInt32 For Number1 = 1 To 20000 Dim Number2 As UInt32 = 0 ...

mysql speed up delete statement

i have some delete queries to run against some pretty huge table (~100 GB), and i want to optimize them as much as possible: delete from table1 where column1 < date_sub(now(), interval 100 hour); column1 is a datetime column, i assume making an index for this column will speed up the deletions. besides that, anything i can do here? wi...

What makes Apple's PowerPC memcpy so fast?

I've written several copy functions in search of a good memory strategy on PowerPC. Using the Altivec or fp registers with cache hints (dcb*) doubles the performance over a simple byte copy loop for large data. Initially pleased with that, I threw in a regular memcpy to see how it compared... 10x faster than my best! I have no intention ...

Can this loop be optimized?

I'm at the debugging/optimization phase with an iPhone app. I have one bottleneck left - the only place where the program has a noticeable lag, and it's in the following loop: (By the way, I've renamed the vars with letters and types. (The real names are much more human-readable in the actual app, but make little sense out of context, so...

Optimization of Neural Network input data.

Im trying to build an app to detect images which are advertisements from the webpages. Once I detect those Ill not be allowing those to be displayed on the client side. Basically I`m using Back-propagation algorithm to train the neural network using the dataset given here. http://archive.ics.uci.edu/ml/datasets/Internet+Advertisements ...

Optimize .png images with PIL

All i need is create a .png image with transparent background, draw some text in black on it and save it using img.save('target.png', option='optimize') It looks like to save .png images in 32-bit mode automatically. Can I reduce the color depth while not make the output images looks much worse before saving? Since it contains only blac...

PNG optimisation tools

A while back I used a PNG optimisation service called (I think) "smush it". You fed it a weblink and it returned a zip of all the PNG images with their filesizes nicely, well, smushed... I want to implement a similar optimisation feature as part of my website's image upload process; does anyone know of a pre-existing library (PHP or Pyt...