I have been seeing a few performance problems with a PHP script on a Linux Fedora Core 11 box, so I was running some commands to look for a bottleneck. One thing I noticed was that writing a file is pretty quick:
[root@localhost ~]# dd if=/dev/zero of=/root/myGfile bs=1024K count=1000
1000+0 records in
1000+0 records out
1048576000 byte...
Recently, my boss asked me to improve the launch speed of our application, the AP was written with C++.
The AP is a little big, it used 200+ dll, Windows needs long time to enter the main() function. I tried these two ways, but still can't make our boss happy.
1. delay load dll http://msdn.microsoft.com/en-us/library/yx9zd12s(VS.80).aspx...
This is extremely slow:
try
{
x = k / y;
}
catch (DivideByZeroException) { }
This is about 5x faster:
if (y > 0) x = k / y;
Can anybody tell me why?
...
hi,
I am working with an application in Linux. It supports both static and dynamic (.so) versions
From the performance standpoint, which version should a user use? The application performs computational tasks that require several hours of CPU time.
Any other advantage of using one lib over the other?
Thanks
...
Let's say I have a collection of thousands of objects, all of which implement the following:
public event EventHandler StatusChanged = (s,e) => {};
private void ChangeStatus()
{
StatusChanged(this, new EventArgs());
}
If no handlers are subscribed to that event for each object, does using the no-op event handler provide any performa...
Are there are any performance cost by creating, throwing and catching exceptions in Java?
I am planing to add 'exception driven development' into a larger project. I would like to design my own exceptions and include them into my methods, forcing developers to catch and do appropriate work.
For example, if you have a method to get a us...
I'm looping through a ResultSet in Java; which for testing purposes is returning about 30 rows with 17 Columns (all String data) per row. I'm manually building an XML String out of the results using StringBuilder and its literally taking about 36 seconds for the loop to finish these iterations.
Note: I realize this isn't the best way to...
Iteration is more performant than recursion, right? Then why do some people opine that recursion is better (more elegant, in their words) than iteration? I really don't see why some languages like Haskell do not allow iteration and encourage recursion? Isn't that absurd to encourage something that has bad performance (and that too when m...
I had a query where an index was not used when I thought it could be, so I reproduced it out of curiosity:
Create a test_table with 1.000.000 rows (10 distinct values in col, 500 bytes of data in some_data).
CREATE TABLE test_table AS (
SELECT MOD(ROWNUM,10) col, LPAD('x', 500, 'x') some_data
FROM dual
CONNECT BY ROWNUM <= 100000...
I have a method like this :
bool MyFunction(int& i)
{
switch(m_step)
{
case 1:
if (AComplexCondition)
{
i = m_i;
return true;
}
case 2:
// some code
case 3:
// some code
}
}
Since there are lots of case statements (more than 3) and the function is becoming large, ...
Hi,
Is the fastcall calling convention really faster than other calling conventions, such as cdecl?
Are there any benchmarks out there that show how performance is affected by calling convention?
...
Hello:
I am trying use Concurrent programming in Scala. Based in this example here in
StackOverflow, I made a program based on Problem 1 of Project Euler.
I try three methods: The first one is a simple execution, with no paralelism. The
second uses java.util.concurrency API through Executors and Callables. The third, based on page men...
Hi,all
i got a performance issue when trying to do:
from twisted.internet import reactor
#some codes here
pid = os.fork()
if not pid:
#some codes blahblahblah
reactor.run()
this caused very low performance and i didn't find useful informations from the official documentation, i believe it because i import reactor module befor...
Hi,
I am creating a web application and am having an issue with my cacheing.
My application has a large amount of data that I want to try and not call from the sql database everytime i need the info.
I have tried to use caching in the following way:
public static List<DAL.EntityClasses.AccountsEntity> Accounts
{
g...
G'day,
We have built a 64bit build of Apache 2.2.14 and deployed it across various Sun servers running Sol10. Server types used for testing are Sun T2000's (32GB memory), 5120's (8GB) and 5240's (16GB).
For each of these we have noticed that there was no appreciable improvement in CPU usage and in fact the server is running slightly ho...
Let's say you're designing the DB schema for the next stack overflow and more specifically the part of the schema that handles question ratings.
I assume you'd use a table like:
ratings(question_id, user_id, rating)
... that will both record ratings and make sure no user votes twice on the same question.
That table alone could handle r...
I am testing the Linq performance now and I cannot figure out what for some time is wasted (MS-SQL Server 2005).
So here is what I have: single table with clustered and non-clustered indices, all searches are done using columns which are covered in 100% by non-clustered index. I have 10 000 records, and all operations "touches" all reco...
Hello,
I'm wondering whether there is a programmatic way to obtain a measure of the full bandwidth used when sending data through a TCP stream. Since I cannot seem to know how the network stack would divide the stream into packets, or when it sends a TCP SYN or ACK or many of the things it does in the background for you, I can only get ...
Does anyone know of a good article, paper, or publication that researches trade-offs between web apps and desktop apps?
Specifically, I'd like to see some data on performance and TCO. Other comparison research would be useful too.
...
Does anyone know of a good article, paper, or publication that researches trade-offs between web apps and terminal apps?
Specifically, I'd like to see some data on performance and TCO. Other comparison points would be useful as well.
...