you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (9 children)

I don't think there's much of a difference between the operating systems. They are extremely similar.

android is garbage collected, iOS is not. iOS is objectively faster, smoother, and more stable

[–]Vulptex[S] 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (8 children)

Android doesn't run on Java. That's nearly impossible for an operating system. Plus, it's a fork of Linux, which is definitely not Java.

What Android does do is encourage developers to write apps in Java for some weird reason. iOS does the same thing with Swift. But neither are really an option for cross-platform compatibility.

[–][deleted] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (7 children)

The android runtime is Java, it just doesnt use the JVM. But like I said its the GC that makes it slower than iOS regardless of whether you want to call it Java or not. Android is garbage collected, iOS is not, and the performance of the OS's reflects that. Garbage collection is much slower and has worse memory usage than reference counting

https://source.android.com/docs/core/runtime

https://www.quora.com/Why-are-most-applications-much-smoother-on-iOS-than-Android

[–]Vulptex[S] 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 2 fun -  (6 children)

Android apps don't have to be Java. There are more development tools available for Java but it can run native code too.

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (5 children)

No, they don't have to be Java, I develop cross-platform apps with Flutter in Dart, but the android OS itself is garbage collected, and iOS is not. There is a significant performance penalty associated with this

https://developer.android.com/topic/performance/memory-overview#:~:text=Any%20time%20a%20generation%20starts,objects%20are%20in%20each%20generation.

https://stackoverflow.com/questions/12811767/ios-garbage-collection#:~:text=iOS%20has%20no%20method%20of,other%20sort%20of%20memory%20management.

[–]Vulptex[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (1 child)

That's not even possible. Even if you could somehow get an OS working in Java, it couldn't be a fork of Linux.

Android seems to have built-in garbage collection for Java, as opposed to using the JVM. If your app uses C with malloc() and free(), there can't be garbage collection. Garbage collection only happens when the app doesn't handle memory allocation itself.

[–][deleted] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (0 children)

Even if you could somehow get an OS working in Java, it couldn't be a fork of Linux.

It isn't a fork of linux, it uses a linux kernel. Android has an entire garbage collected runtime sitting on top of the kernel that translates everything to bytecode. An OS is more than just a kernel. The enitire Android UI is running in Java on top of that garbage collected android runtime

[–]chickenz 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (2 children)

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (1 child)

Yes Ed, lack of garbage collection is part of what makes C so fast too

[–]chickenz 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

c is fast because it runs on Atari.