I have been working lately on a number of iterative algorithms in MATLAB, and been getting hit hard by MATLAB's performance (or lack thereof) when it comes to loops. I'm aware of the benefit of vectorizing code when possible, but are there any tools for optimization when you need the loop for your algorithm?
I am aware of the MEX-file ...
I am trying to write a utility to see if a user has logged in to windows since a date that I have stored in a database.
private void bwFindDates_DoWork(object sender, DoWorkEventArgs e)
{
UserPrincipal u = new UserPrincipal(context);
u.SamAccountName = "WebLogin*";
PrincipalSearcher ps = new PrincipalSearcher(u);
var res...
Possible Duplicate:
Why minify assets and not the markup?
I have seen a lot of sites using minified CSS and JavaScript to increase website response time but I have never seen any sites use minified HTML. Why would you not want your HTML to be minified?
...
What are some important optimizations that can be made to a website to reduce the loading time?
...
I have heard a lot that PHP is slow compared other languages. Is the speed difference noticeable enough that I should switch to another language? And if so what other language would you recommend? Or what would be some good optimizations that could speed up the PHP?
...
From Wikipedia:
The deep Web (also called Deepnet, the
invisible Web, dark Web or the hidden
Web) refers to World Wide Web content
that is not part of the surface Web,
which is indexed by standard search
engines.
Mike Bergman, credited with coining
the phrase,has said that searching on
the Internet today can be com...
I am working on an auction web application. Now i have a table with bids, and from this table i want to select the last 10 bids per auction.
Now I know I can get the last bid by using something like:
SELECT bids.id FROM bids WHERE * GROUP BY bids.id ORDER BY bids.created
Now I have read that setting an amount for the GROUP BY results ...
To make this more clear, I'm going to put code samples:
$file = fopen('filename.ext', 'rb');
// Assume $pos has been declared
// method 1
fseek($file, $pos);
$parsed = fread($file, 2);
// method 2
while (!feof($file)) {
$data = fread($file, 1000000);
}
$data = bin2hex($data);
$parsed = substr($data, $pos, 2);
$fclose($file);
T...
Take a simple OrderDetail table which has a Quantity and UnitPrice for each record. To get the total value of each Order with SQL it's simple as
SELECT OrderID, SUM(UnitPrice*Quantity)
FROM OrderDetail
GROUP BY OrderID
After converting the table to a XML file, using XQUERY I'm able to get the same information like this
for $orderId ...
Are there any downloadable programs that will perform common CSS optimization techniques? Looking for something not online.
...
As the question says, I am curious if any of you know about attributes that affect how the CLR will compile/optimize the bytecode. Is there an attribute that will affect code inlining decisions? Unroll loops?
Are there undocumented attributes on classes generated for anonymous types/delegates?
There's probably attributes to disable op...
Hello. I'm trying to optimize the performance of my code, but I'm not familiar with xcode's debuggers or debuggers in general. Is it possible to track the execution time and frequency of calls being made at runtime?
Imagine a chain of events with some recursive calls over a fraction of a second. What's the best way to track where the...
Hi there,
I have a registration form with common registration fields and two multiple selection Lists with heading "services".
I wanted to store form data to database into a table.
Currently i am having only one table "registrations", also i am having second thoughts whether i should create another relation table with name "registration...
Hi!
As far as I know, mysql doesn't use index if using IN(1, 2...n) queries. Am I wrong? Or is there anything I could do to make mysql use it? I don't mean IN() subquery optimization, because this is clearly explained in the manual.
Example (assuming there is an index on all fields, named index_abc):
WHERE a = 1 AND b = 2 AND c = 3 - ...
I am a newbie on optimization. I have been reading some reference on how to optimize c++ code but I have a hard time applying it to real code. Therefore I just want to gather some real world optimization technique on how to squeeze as much juice from the CPU/Memory as possible from the loop below
double sum = 0, *array;
array = (double*...
I recently created a function in javascript that takes in a file name and a max character limit where the result needs to follow these rules:
Always include file extension
If shrinking occurs, leave the first part and last part of the file name intact.
Always replace the removed characters with '...'
If file length is under the max the...
I need to select multiple records
I use
SELECT *
FROM `table`
WHERE `ID` =5623
OR `ID` =5625
OR `ID` =5628
OR `ID` =5621
this query run 4 times in every second whit php
is there a better and faster way for this ?
...
Basically .I am using Apache threads to serve request in a web application
via cgi. These cgi create an instance of searcher, search the HD indexes
and gets the result back .
Now, I am trying to map the file structure of lucene index onto memory and
then utilise the same instance of indexes for every request .
For this , I need to pass o...
Are there any efficient bitwise operations I can do to get the number of set bits that an integer ends with? For example 1110 = 10112 would be two trailing 1 bits. 810 = 10002 would be 0 trailing 1 bits.
Is there a better algorithm for this than a linear search? I'm implementing a randomized skip list and using random numbers to determi...
The CUDA programming guide states that
"Bandwidth is one of the most important gating factors for performance. Almost all changes to code should be made in the context of how they affect bandwidth."
It goes on to calculate theoretical bandwidth which is in the order of hundreds of gigabytes per second. I am at a loss as to why ho...