Jump to content

Reason why Android needs more RAM compared to iOS

RedRound2

Ram is cheap we should all have 4gb at least on a phone, screw phone makers

Intel 4670K /w TT water 2.0 performer, GTX 1070FE, Gigabyte Z87X-DH3, Corsair HX750, 16GB Mushkin 1333mhz, Fractal R4 Windowed, Varmilo mint TKL, Logitech m310, HP Pavilion 23bw, Logitech 2.1 Speakers

Link to comment
Share on other sites

Link to post
Share on other sites

/s

 

those kind?

Exactly  ;)

My PC CPU: 2600K@4.5GHz 1.3v Cooler: Noctua NH-U12P SE2 MB: ASUS Maximus IV RAM: Kingston 1600MHz 8GB & Corsair 1600MHz 16GB GPU: 780Ti Storage: Samsung 850 Evo 500GB SSD, Samsung 830 256GB SSD, Kingston 128GB SSD, WD Black 1TB,WD Green 1TB. PSU: Corsair AX850 Case: CM HAF X. Optical drive: LG Bluray burner  MacBook Pro, Hackintosh

Link to comment
Share on other sites

Link to post
Share on other sites

Ram is cheap we should all have 4gb at least on a phone, screw phone makers

Electrically it's quite expensive. Every bit is one more capacitor to try to maintain a charge on. The more RAM you have, the less battery life you will have. Programmers need to be able to work within system constraints. Frankly we should stop making phone applications in Java. They should all be in a machine-code compiling language. Virtual machines and garbage collection are too expensive. We have OpenFrameworks to make anything for graphics, and C++ has plenty of good ARM compilers.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Long story short

apps are running as virtual machines(VM) on Android with their unique Id.VM needs loads of memory but it has its own good things

first of all,it does not run with the OS, it runs In the os. That means the android can controll the program good, hence it asks you which resoursec it will used, but not on ios

secondly it is safe®. These machines cannot communicate with each other unless theh have the same id, for example facebool group programs

( although im sure it can be hacked in a way or another have not really looked after the hacking android topic)

android is a strange but smart OS, although im yet to understand iOS( no free time :/)

Link to comment
Share on other sites

Link to post
Share on other sites

wernt most of these issues already fixed with ART

it did address the garbage collection issue

 

current my nexus 5 with 5.0

system is using 140Mb

and 434MB for the apps

1.3GB free

If your grave doesn't say "rest in peace" on it You are automatically drafted into the skeleton war.

Link to comment
Share on other sites

Link to post
Share on other sites

current my nexus 5 with 5.0

system is using 140Mb

and 434MB for the apps

1.3GB free

And probably 500MB cached apps for a faster app start but it was the same under Dalvik.
Link to comment
Share on other sites

Link to post
Share on other sites

And probably 500MB cached apps for a faster app start but it was the same under Dalvik.

under dalvik app is compiling everytime you start it, with ART it's pre compiled, no need to compile everytime you want to use app. yes pre ART needs slightly more storage but it's way better fo battery and faster then dalvik :)

Computer users fall into two groups:
those that do backups
those that have never had a hard drive fail.

Link to comment
Share on other sites

Link to post
Share on other sites

Electrically it's quite expensive. Every bit is one more capacitor to try to maintain a charge on. The more RAM you have, the less battery life you will have. Programmers need to be able to work within system constraints. Frankly we should stop making phone applications in Java. They should all be in a machine-code compiling language. Virtual machines and garbage collection are too expensive. We have OpenFrameworks to make anything for graphics, and C++ has plenty of good ARM compilers.

By "machine-code compiling language" do you mean a compiled language (as opposed to interpreted language)? If that's what you mean then I have some good news. With ART (default in Android 5.0) the programs will be precompiled. It will still be Java but at least it won't be as terrible as it is right now.

It kind of sucks that Google went with Java to begin with though. It would have been nice if they had given developers the choice to use some flavor of C as well. Maybe it would have been too much work to support two languages.

 

 

 

Long story short

apps are running as virtual machines(VM) on Android with their unique Id.VM needs loads of memory but it has its own good things

first of all,it does not run with the OS, it runs In the os. That means the android can controll the program good, hence it asks you which resoursec it will used, but not on ios

secondly it is safe®. These machines cannot communicate with each other unless theh have the same id, for example facebool group programs

( although im sure it can be hacked in a way or another have not really looked after the hacking android topic)

android is a strange but smart OS, although im yet to understand iOS( no free time :/)

No what the OP is talking about is not related to the virtual machine. OP is talking about garbage collection. There are plenty of programming languages which doesn't use virtual machines and still use garbage collection (C for example).

Link to comment
Share on other sites

Link to post
Share on other sites

under dalvik app is compiling everytime you start it,...

Only when the app was stopped completely but Android is trying to keep as much as possible in the ram.

Link to comment
Share on other sites

Link to post
Share on other sites

By "machine-code compiling language" do you mean a compiled language (as opposed to interpreted language)? If that's what you mean then I have some good news. With ART (default in Android 5.0) the programs will be precompiled. It will still be Java but at least it won't be as terrible as it is right now.

It kind of sucks that Google went with Java to begin with though. It would have been nice if they had given developers the choice to use some flavor of C as well. Maybe it would have been too much work to support two languages.

 

 

 

No what the OP is talking about is not related to the virtual machine. OP is talking about garbage collection. There are plenty of programming languages which doesn't use virtual machines and still use garbage collection (C for example).

Interpreted languages are those which are compiled in real time. Java is a weird animal that sits between a compiled and an interpreted language. It runs on a virtual machine, but it's a pre-compiled binary which passes in values to that virtual machine. In Python the code is compiled in real time to a virtual language which is then passed into a virtual machine.

 

So Java is a compiled language, but it's a virtual compiled language instead of a machine-code compiled language. Also, you can build C++ apps for Android, but people generally suck at it despite the fact it is THEE most portable language. Before a chip with new instructions is ever put into fabrication, the C/C++ compilers have already been made. I don't understand why we keep Java around honestly. It's good for quick deployment of server applications, but even Java's sockets have weird bugs that haven't been fixed in a decade.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Interpreted languages are those which are compiled in real time. Java is a weird animal that sits between a compiled and an interpreted language. It runs on a virtual machine, but it's a pre-compiled binary which passes in values to that virtual machine. In Python the code is compiled in real time to a virtual language which is then passed into a virtual machine.

 

So Java is a compiled language, but it's a virtual compiled language instead of a machine-code compiled language. Also, you can build C++ apps for Android, but people generally suck at it despite the fact it is THEE most portable language. Before a chip with new instructions is ever put into fabrication, the C/C++ compilers have already been made. I don't understand why we keep Java around honestly. It's good for quick deployment of server applications, but even Java's sockets have weird bugs that haven't been fixed in a decade.

I am pretty sure you have made up the term "machine-code compiled language" yourself but I think I know what you mean. You mean that the program is precompiled and not compiled to bytecode (like Java does), correct?

 

Ohh I didn't know you could make C++ applications for Android. I wonder how much faster Android apps would be if everyone switched to it (and coded properly). It seems like Google heavily recommends against it on their website.

Link to comment
Share on other sites

Link to post
Share on other sites

I am pretty sure you have made up the term "machine-code compiled language" yourself but I think I know what you mean. You mean that the program is precompiled and not compiled to bytecode (like Java does), correct?

 

Ohh I didn't know you could make C++ applications for Android. I wonder how much faster Android apps would be if everyone switched to it (and coded properly). It seems like Google heavily recommends against it on their website.

I've never heard a proper term for it, to differentiate between programming languages which compile to bytecode or to machine code. If there is one I'd like to know.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Ohh I didn't know you could make C++ applications for Android. I wonder how much faster Android apps would be if everyone switched to it (and coded properly). It seems like Google heavily recommends against it on their website.

They recommend against it because people like to use the "new" keyword a lot coming from a Java background and forget to delete everything once it's no longer useful. Google recommends against it because most app developers aren't good programmers. They're just good designers with enough of a handle on code to make something.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

I've never heard a proper term for it, to differentiate between programming languages which compile to bytecode or to machine code. If there is one I'd like to know.

There is no difference between bytecode and machine code.

Link to comment
Share on other sites

Link to post
Share on other sites

There is no difference between bytecode and machine code.

facepalm* Yes there is. Byte code is translated in real time by a program called a virtual machine which decides where addresses should be distributed based on the program (to develop a data structure), and then it sends machine code instructions to the CPU which then executes them. This is why byte code languages generally suck for performance.

 

Don't challenge the CS master's student on something that fundamental please.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

facepalm* Yes there is. Byte code is translated in real time by a program called a virtual machine which decides where addresses should be distributed based on the program (to develop a data structure), and then it sends machine code instructions to the CPU which then executes them. This is why byte code languages generally suck for performance.

You can implement a CPU which supports the instruction set of the "bytecode" making it effectively machine code. Differentiating between them is therefor impossible. Both terms still get used to describe where the code is supposed(!) to run but from a technical level they are exactly the same.

 

edit: also, you can replace the word byte code in your sentence and it still makes sense:

 

Machine code is translated in real time by a program called a virtual machine which decides where addresses should be distributed based on the program (to develop a data structure), and then it sends machine code instructions (for the target CPUs IS) to the CPU which then executes them.

emphasis mine

Link to comment
Share on other sites

Link to post
Share on other sites

Is adding an extra GB of Ram on phones really that expensive? if not I dont see why they don't just all have 4GB of ram.

 

Spoiler

-

CPU:Ryzen 9 5900X GPU: Asus GTX 1080ti Strix MB: Asus Crosshair Viii Hero RAM: G.Skill Trident Neo CPU Cooler: Corsair H110

Link to comment
Share on other sites

Link to post
Share on other sites

You can implement a CPU which supports the instruction set of the "bytecode" making it effectively machine code. Differentiating between them is therefor impossible. Both terms still get used to describe where the code is supposed(!) to run but from a technical level they are exactly the same.

No, because the uses of each are completely different. Byte code must always be translated and/or interpreted. Machine code runs natively on a physical machine. They're not used interchangeably anywhere in academy or in the industry (I've interned at Qualcomm).

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Is adding an extra GB of Ram on phones really that expensive? if not I dont see why they don't just all have 4GB of ram.

Electrically it's very expensive, even if monetarily, not so much.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Hmm...interesting. I still think iPhones and iPads should have at least 2GB of memory/RAM

because crashes often happen due to insufficient memory................which is quite annoying.

 

The iPad Air 2 has 2GB... My iPad Mini 2 has 1GB, just as the iPhone 6, 5S, 5 and iPad Air and 4... I find that 1GB is still enough for iOS, even though it really isn't a lot.

 

512MB is really the extreme borderline for iOS now, where devices simply don't have enough memory... My iPhone 4S has this issue constantly and that also makes that device extremely slow due to the need for disk caching and reloading apps.

Owner of a top of the line 13" MacBook Pro with Retina Display (Dual Boot OS X El Capitan & Win 10):
Core i7-4558U @ 3.2GHz II Intel Iris @ 1200MHz II 1TB Apple/Samsung SSD II 16 GB RAM @ 1600MHz

Link to comment
Share on other sites

Link to post
Share on other sites

No, because the uses of each are completely different. Byte code must always be translated and/or interpreted. Machine code runs natively on a physical machine. They're not used interchangeably anywhere in academy or in the industry (I've interned at Qualcomm).

https://en.wikipedia.org/wiki/Java_processor

Link to comment
Share on other sites

Link to post
Share on other sites

Oh please these are toys! You don't see these things actually used in industry! This is a joke!

Someone doesn't want to believe that he was wrong. ¯\_(ツ)_/¯

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×