C++ code performance drop in iOS device [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have implemented some C++ code, and have run it on a Windows machine. The execution time takes around 220 milliseconds. I ran the same code on an iOS device (iPad), where it takes 1 second for the execution time.
What would be the reason? How can I achieve the same performance on an iOS device? Is there any way to increase the performance of C++ code on such a device?
What are the ways to increase the performance of a C++ code in iOS?

I suppose the average Windows machine will be a lot more powerful than an iPad for many tasks.
That said, use Instruments (part of Xcode) to profile the code and see where it's spending most of its time, maybe some optimisations for iPad will become clear.

Related

Is there a way to measure performance of your code apart from runtime? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
If I make some changes to my code in the hopes that it will improve performance, what's the best way to tell? Just running my code again I often find that Yes, it improved speed from 20.0 seconds to 19.5 seconds, but then I run it again and whops, 20.1 seconds. Is there something like a "total number of operations" or something that will be completely deterministic between runs that you can use to measure performance? I am coding C++ in Visual Studio

Reduce the size of Flash memory embedded cpp [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
After a lot of research i could not find any solution to my question (if i did i woudln't be here ...)
I'm looking for solutions that permits me to reduce the flash memory used by my program.
I'm programming an embedded c++ programm and when i Flash my electronic card in release mode everything is fine cause it doesn't overflow the space of the flash memory, but that is not the case when i do it in Debug mode... I want to know if it is possible to find functions (my goal is to do it without reducing the code) that could reduce Flash memory.I already thought about defragmentation but I don't find how to do it in embedded even though i don't even know if i can ... I also tried the -Os cmd from gcc but without any big success
So I'm taking any advices or support and i'll be there at any question about my issue ;)
Thanks !
Look at your map file. Is there something there you don't
expect? Functions you aren't expecting (like floating point, or
exception handling, etc.) or something unreasonably large?
Turn on optimization except for the file you're interested in.
Make sure you've actually got optimizations turned on (look at the build log and ensure that you've got -Os being passed to each compile step)
Consider link time optimizations, but don't expect miracles
Welcome to embedded programming. 90% of the job is figuring out how to stuff the never ending requirements into the memory available. Rinse and repeat.

Chromium OpenGL dead project? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've recently started exploring the guts of VirtualBox's Guest Extensions on my Ubuntu Guest. Mostly from curiosity. Partly due to "OpenGL Warning: ... not found in mesa table" warnings. I noticed they are using Chromium OpenGL implementation. I have a two part question.
1.How do I get rid of those warnings? Are they indications of a larger problem? I'm noticing repaint issues which lead me down this path.
2.Am I missing something are is this a 12 year old project last touched 6 years ago!? Is it being actively developed some where else? Will it support OpenGL 3?
Online references would be appreciated as I'm having a hard time finding anything other than these below.
http://sourceforge.net/p/chromium/discussion/stats
http://chromium.sourceforge.net/doc/index.html
The chromium project is basically dead since 2008 or so. There is no support for GL3.x, and it is not planned. Actually, implementing the main purpose of chromium (application-transparent distributed rendering by manipulating the GL command stream) is incredibly hard to outright impossible with the programmable pipeline and modern GL features.
I'm not really familiar with virtualbox, but I am aware that they just used parts of the chromium project to implement a hw-accelerated guest GL simply by forwarding the GL command stream to the host. Such a task is much easier to adapt to modern GL, as no real stream manipulation is to be done. But I'm not aware of how far they have come on that path. So consider this only half of an answer to your question.

How is it possible to create an information fetcher for a game like League of Legends? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Basically what I'm wondering is, how could you get like a list of all mobs, champions their hp, mana etc with programming? I know this is possible because it has been done before but I just can't see how you would be able to do this. Is looking in the assembler code necessary or can you do it in some other way? I'm mostly wondering about the theory behind it. (Using C++ if that helps anything at all)
Such things are usually done using crawling (e.g. retrieving the data from the web pages provided by Riot Games; might be partially outdated) or using reverse engineering to get this data from the game client's files (might not contain everything). In either way you'd get datasets which you'll have to read or interpret (look for values or replicate the way the game client reads and interprets the data).
I'm not sure whether there are some tools or APIs released somewhere, at least I haven't heard of anything officially supported or endorsed; most of this is essentially in a gray zone usage wise.

Scientific application suddenly slowed down on Linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I do scientific computing using c++ with a couple of basic fortran routines in a Xubuntu 12.10 distribution. Things have been running well for years. All of the sudden today when messing with my code the time to complete each iteration would jump drastically half way through a run. Figuring I made a mistake I reverted to an old git version, remade the whole thing and still had the same issue. I've run the code on other computer ans the time per iteration remains constant. What could possibly be the issue?
Best guess: You CPU is overheating. As such, the processor throttles itself to prevent damage. Your code itself is likely what triggers the heat levels to spike. Hence, when you get "half way through a run", your CPU is sufficiently warm where it detects it needs to slow down.
Check to make sure your case fans, CPU fans, and any other cooling on your machine is working correctly. Maybe just turning off the machine for a bit to let it cool down, then restarting/rebooting will resolve the issue.