It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
This is a bit of a generic question.
I am working on an iOS cocoa-2d game which involves complex path finding algorithms. The game is turn based. So before each user's turn I would like to calculate all possible paths. This involves running a lot of data manipulation commands and allocate and releasing simple data objects (no I/O) I am guessing about a million instructions are required to calculate all the paths each turn. Could the iPhone 3GS, 4 and 4G perform this at a fraction of a second, assuming the game is using a single thread.
In general how many instructions per second can be achieved within the game. I am looking for a guesstimate very high level figure.
This greatly depends on the type of "instructions" used in your algorithm or calculation, how they are scheduled by your compiler, and how you count them.
In extremely rough and coarse terms, the ARM CPUs currently used by Apple can issue on the order of 1 integer instruction per clock cycle, and the ARM processor cores used in iOS devices reportedly range in clock speed from 400 MHz to 1 GHz. A high ratio of floating point, multiply or divide instructions or cache misses may significantly change the actual instruction issue and retirement rate.
But the best way to get an accurate estimate would be to compile and benchmark your actual code on your target iOS device.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm getting interested in PLC programming and my idea is to just try it. Therefore I need to simulate some real system, because it's to soon to look for some hardware. This is how I wish to do it (example):
Simulate some real system, ie. water tank with bleed and inlet valves, some water level sensor of course. These are controled and checked by PLC.
PLC simulator to control valves and get values from sensor. Also send data to some HMI/SCADA (PLCsim ?)
Some software to program the logic into PLC. (Step7 ?)
Some GUI for end user to check values and control valves manually (InTouch ?, ControlWeb ?, WinCC ?, LabView ?)
I don't know if this is possible completely by using software and if there is a chance it will work. Your advices and ideas are appreciated.
Thanks
Definitely. If money is an issue, AutomationDirect.com has a new product called Do-more where the programming software is free (called Designer) and it comes with a free PLC simulator.
I would then recommend writing separate code-block(s) to simulate "the process", where the code-block(s) READ from Outputs (discrete and analog) and WRITE to Inputs (discrete and analog) based on the Output states (and time, and random external events - think butterfly effect).
Disclosure: I work for Host Engineering, developers of Do-more.
If money is NOT an issue, I know there are lots of PLC Simulators and Process Simulator software out there that somebody can probably recommend.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
If I am using CLLocationManger with kCLLocationAccuracyThreeKilometers for getting Coordinates and never stop it.
Have you any idea that in how much time my iPhone battery will drain?
This question is difficult to answer as there are many variables involved, such as, device model, device age, OS version, GPS chipset (varies among device models), ... This is one of the reasons why you should strive to optimize your usage of the GPS functionality.
Apple, for example, caches location data on regular time intervals so it can provide third party applications with location data (1) fast and (2) without the need to fire up the onboard GPS, which requires time and power. (For your information, cached location data is of course not an option if your application relies heavily on location services).
In short, don't count the battery for your application to function properly. Instead, make clever use of the location services.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Developing an algorithm that will eventually make its way into an iPhone app. Right now on my 3.4GHz quad core, 8 thread intel processor, the algo takes about 3 seconds. Any way to parlay these numbers to iPhone 4s specs? I've read the processer is 1GHz, but my sense is there is not an apples to apples linear comparison.
Even if you could divide by 32*3.4 it still would be apples to oranges. The iPad uses an ARM processor that has a very different architecture to your intel processor, as well as running on a completely different OS, using different process management techniques. I'm afraid the only way is to just run it on a real device and profile it.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am working on making a boot loader. I don't know anything till now. I am learning. What is a 16 bit Real mode OS ? What does "Real Mode" means
Read more about X86 and its real mode
In short, it is painful, and exists today for historical reasons.
Why do you work on a boot loader? Did you consider using GNU GRUB to load whatever kernel software you want to load? At least, study the source of some existing boot loader like Grub or LILO
"16 bits" means that that's the size of a "word" as recognized by the CPU (though memory may be organized into bytes, etc). It also implies that the memory address will not be substantially larger than 16 bits, but that gets to be a fuzzy area.
"Real mode" means that the memory is addressed without using any memory-mapping hardware. Ie, the address 1234 in a CPU register will, when used to reference memory, fetch the value at the physical location 1234 in RAM. Usually also implied is that there is little in the way of memory "protection" -- at most just a CPU register than reserves space above or below a certain address as "read-only".
Old original MS DOS would be considered to fall into this category, as would the original Apple II operating system, and many others that are mostly forgotten. Even some fairly large early computers (ie, multiple 6-foot-tall racks of equipment) operated in this mode.
I suggest having a look at James Molloy's Kernel Development Tutorial which introduces you to using GRUB and booting your kernel you can learn to write.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Our application has to download 800 images within 30 secs, but even if we increase time for 1 min, our application is still not able to download all the images.
How can we increase the download speed? so that we can download 800 images within 30 secs?
Is it possible?
Could someone please suggest.
Are you downloading the images one at a time, waiting for the first to finish before requesting the second? It might complete faster if you start multiple downloads in parallel (but not too many!).
If the speed is not limited by your internet connection physically, try to use multiple threads/processes. This is how mass-downloaders work.
There is no way to do this on your end. You need a faster network connection or the images you are downloading must be smaller. (If it were possible to speed up downloads from the user's side, there would never be lag in online games.)
You can combine the images into a ZIP file.
Downloading multiple resources parallelly could reduce download time significantly. fork can be used for parallel execution.
Have a look at Parallel::ForkManager which will help you accomplish the task at hand easily. The DESCRIPTION section in the POD of the module provides an example of a downloader.
Based on your system configuration, you will have to experiment to determine the maximum number of parallel processes. Too less or too many processes can affect performance.
Factors which will affect performance are:
CPU speed
CPU scheduler
Memory
Network speed
Network congestion