I understand the behavior of const-qualified data types. I am curious, though, if there is any performance gain or loss from over- or under-zealousness of qualifying variables as const. I am thinking particularly of variables declared and used exclusively within an isolated code block. For example, something like:
const qreal padding = ...
If I have array of structs MyStruct[]:
struct MyStruct
{
float x;
float y;
}
And it's slower than if I do float[] -> x = > i; y => i + 1 (so this array is 2x bigger than with structs).
Time difference for 10,000 items compare each other (two fors inside) : struct 500ms, array with only floats - 78ms
I thought, that struct a...
I would like to pass a considerable sized amount of data (~1500 bytes) between two applications in Android where performance and resource allocation is a priority. The data is basically key-value pairs. The rate at which it needs to be passed from one application to another can vary from a trickle to ~50 packets within a second. I figure...
Generally, in-memory data structures such as B-Tree or STL map usually has good performance on both lookup and update. However, the contained data are lost once the process is closed or power is shutdown. On the other hand, on-disk data structures such as embedded database and file mapping persist data, at the cost of low performance bec...
Hi there!
I'm working on web app (Rails 3 based). And I really don't like the time it takes to generate the page - depending on the displayed data it takes up to 2.5 and even 4 seconds.
So I just was wondering what is the average reasonable time for generating page in your apps. Saying you check the generation time, e.g. it's 750ms and...
I'm interested in open source messaging and/or distributed cache technologies that satisfy the following requirements.
Multiple load-balanced instances of Java web application (probably on Amazon EC2)
It's possible for number of instances to be changing over time for scaling.
When a request comes with an id FOO, the event is cached i...
I read many files from my system. I want to read them faster, maybe like this:
results=[]
for file in open("filenames.txt").readlines():
results.append(open(file,"r").read())
I don't want to use threading. Any advice is appreciated.
the reason why i don't want to use threads is because it will make my code unreadable,i want to fi...
When using the TransitioningContentControl and a Panorama, I cannot seem to get any good performance when I am navigating from one page to another.
I have been implementing a basic Flip animation, where the current content gets flipped out and the new one is flipped in, but the apps FPS drops to less than 20FPS which means you never ge...
All,
Can anyone please let me know exactly what are the performance issues between the 2? The site : CodeRanch provides a brief overview of the internal calls that would be needed when using keySet() and get(). But it would be great if anyone can provide exact details about the flow when keySet() and get() methods are used. This would h...
Ok, this is a performance question I guess.
I have a slider with two navigation links (next and previous) and when the slider gets to the end of the row I am currently unbinding the next button, then binding again when it goes in the other direction. I am performing the same operation for the next button, but reversed.
the code for the...
I need to find where the bottlenecks are in my Android app.
What profiling tools or techniques can I use?
...
Suppose i have to filter some text from a file. Then i have 2 solutions
Either I take all the contents of file into
a single variable(like fileinputstream or something else) which can be
parsed using regular expression.
Or i use looping to read file line
by line. Then i apply either regular
expression or some string function on each li...
In Eclipse, there is a optional warning when a private field is accessed from an inner class, saying that a synthetic accessor method will be generated and that performance may be improved by making the field package-private.
Does this synthetic method really incur performance penalty? I thought that accessors are generally inlined at ...
Hello All!
I recently deployed a Spring MVC application to google app engine, and the intial load time is about 7sec. Once the application is loaded, the app is quite responsive. But, if the app is idle for more than 1 minute (there isn't ANY traffic to it) the app needs to be again reloaded by GAE, which, takes about 7sec as well. For...
So, for performance reasons, I need my app to store big arrays of data in a way that's fast to parse.
I know JSON is readable but it's not fast to decode. So it's I should either convert my array into pure php code or I have to serialize it and then deserialize. So, which is faster? Are there any better solutions?
I could do a benchmark ...
Title says mainly the problem. On my spare time for our group at school, I've written something to parse our p4 submissions and the files associated with each changelist.
I've then created a tree structure and each file has a list of all the changelists and ones that pertain to bugs associated with them.
I'm looking for awesome ideas o...
EDIT seems my original post below might have been a bit long.
Simply said, can I spawn some AppDomains and ensure that they cannot communicate with one another in any way?
There is a competitive robotic soccer simulation league called RoboCup 3D. One of the fundamental rules is that all communication between agents be conducted thro...
I want to make sure AJAX responses from dynamic JSON pages does not slow down the server when the SQL queries take too long. I'm using PHP, MySQL with Apache2. I had this idea to use ini_set() to recude the execution of this pages with the inline use of the mentioned method or the set_time_limit() method. Is this effective? Are their any...
Hi,
I'm still wrapping my head around some of the nuances of memory management in objective-C, and came up with the following case I'm unsure about:
+ (NSDecimalNumber*)factorial: (NSDecimalNumber *)l {
NSDecimalNumber *index = l;
NSDecimalNumber *running = [NSDecimalNumber one];
for (; [index intValue] > 1; index = [inde...
i download many html store in os,now get their content ,and extract data what i need to persistence to mysql,
i use the traditional load file one by one ,it's not efficant cost nealy 8 mins.
any advice is welcome
g_fields=[
'name',
'price',
'productid',
'site',
'link',
'smallImage',
'bigImage',
'description',
'createdOn',
'mo...