Hey guys quick question, I am currently echoing a lot of javascript that is based conditionally on login status and other variables. I was wondering if it would be better to simply echo the script include like <script type="text/javascript" src="javascript/openlogin.js"></script> that has been run through a minifying program and been gzi...
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...
Hello,
I was told more than once that Delphi handles dynamic classes better than static.Thereby using the following:
type Tsomeclass=class(TObject)
private procedure proc1;
public
someint:integer;
procedure proc2;
end;
var someclass:TSomeclass;
implementation
...
initialization
someclass:=TSomeclass.Create;
finalizat...
Currently, I am testing every integer element against each other to find which ones match. The arrays do not contain duplicates within their own set. Also, the arrays are not always equal lengths. Are there any tricks to speed this up? I am doing this thousands of times, so it's starting to become a bottle neck in my program, which is ...
Hi, I have been optimizing my website but the one problem that stands in my way is all the jQuery functions that I do not use. The only ones that I use are for a smooth page scroller. It just seems like such a waste of download time.
My question is: Is there any script or program that will remove the jQuery code that I do not need and l...
hi
I am working on GPU device which has very high division integer latency, several hundred cycles. I am looking to optimize divisions.
All divisions by denominator which is in a set { 1,3,6,10 }, however numerator is a runtime positive value, roughly 32000 or less. due to memory constraints, lookup table may not be a good option.
Ca...
What is faster and/or generally better?
vector<myType> myVec;
int i;
myType current;
for( i = 0; i < 1000000; i ++ )
{
current = myVec[ i ];
doSomethingWith( current );
doAlotMoreWith( current );
messAroundWith( current );
checkSomeValuesOf( current );
}
or
vector<myType> myVec;
int i;
for( i = 0; i < 1000000; i ++ )
{
doSome...
Is there a procedure by which you can optimize/shrink/select/obfuscate only 'used by your app' classes/methods/fields from rt.jar provided by Sun by using some optimization software like ProGuard (or maybe other?). Then you would actually be able to minimize the download size of your application considerably and make it much more secure ...
hi guys,
i'm using this function to parse this json data but i find the function to be really slow in IE7 and slightly slow in IE8.
basically the first listbox generate the main product list, and upon selection of the main list, it will populate the second list.
this is my data:
[{"ProductCategoryId":209,"ProductCategoryName":"X-Fi","...
$s = explode (" ", microtime());
$s = $s[0]+$s[1];
$con = mysqli_connect ('localhost', 'test', 'pass', 'db') or die('Err');
for ($i=0; $i<1000; $i++) {
$stmt = $con -> prepare( " SELECT MAX(id) AS max_id , MIN(id) AS min_id FROM tb ");
$stmt -> execute();
$stmt->bind_result($M,$m);
$stmt->free_result();
$rand = mt_rand( $m , ...
Preferable for x86-32 gcc implementation
...
Assuming MyClass uses the default destructor (or no destructor), and this code:
MyClass *buffer = new MyClass[i];
// Construct N objects using placement new
for(size_t i = 0; i < N; i++){
buffer[i].~MyClass();
}
delete[] buffer;
Is there any optimizer that would be able to remove this loop?
Also, is there any way for my code to d...
I am using Community Server 2007 Express engine (1000+ unique hosts per day) and have some problems with hosting provider.
How can I optimize engine to decrease server loads?
...
The problem
My concern is the following: I am storing a relativity large dataset in a classical python list and in order to process the data I must iterate over the list several times, perform some operations on the elements, and often pop an item out of the list.
It seems that deleting one item out of a Python list costs O(N) since Py...
Android comes with lots of system resources (android.R) that can be used to save you time and make your application lighter.
For example, I recently discovered that Android provides localized strings for Yes (android.R.strings.yes), No (android.R.strings.no), Cancel (android.R.strings.cancel) and Ok (android.R.strings.ok), among other s...
I have a database that keeps record history. For each update to a record, the system will "deactivate" the previous record (along with all it's children), by setting the "Status" column to "0".
Now it's not a problem yet...but eventually this system is going to have a lot of records, and history is more important than speed right now. B...
In an app I'm profiling, I found that in some scenarios this function is able to take over 10% of total execution time.
I've seen discussion over the years of faster sqrt implementations using sneaky floating-point trickery, but I don't know if such things are outdated on modern CPUs.
MSVC++ 2008 compiler is being used, for reference.....
In an app I'm profiling, I found that in some scenarios this function is able to take over 10% of total execution time.
MSVC++ 2008 compiler is being used, for reference... I don't recall if modf maps to a single instruction or if there is likely any way to make it faster.
see also here for similar question on sqrt function
Unlike sqr...
Hi all. Basically I have an xml feed from an offsite server.
The xml feed has one parameter ?value=n now N can only be between 1 and 30
What ever value i pick, there will always be 4000 rows returned from the XML file. My script will call this xml file 30 times for each value once a day. So thats 120000 rows. I will be doing quite comp...
Hey,
I'm looking for help with Ruby optimization regarding loading of associations on demand.
This is simplified example. I have 3 models: Post, Comment, User. References are: Post has many comments and Comment has reference to User (:author). Now when I go to the post page, I expect to see post body + all comments (and their respectiv...