4 ms·
C# with MAUI went full OOP Swift with SwiftUI embraced the data oriented way with structs only They both target resource constrained devices, wich will perfor
by Shadonototro 6y ago
C# with MAUI went full OOP
Swift with SwiftUI embraced the data oriented way with structs only
They both target resource constrained devices, wich will perform better?
I can already tell, apps with MAUI will be laggy on most android phones, probably less on iPhones since the hardware/OS is just better, just like with Xamarin today
- metaltyphoon 6y agoWhat? Xamarin apps currently compile to native code, so idk where you are getting this idea from.
- Shadonototro 6y agoIt doesn't matter, native code doesn't make your program automatically faster, C# code is hard to aot compile, lot of things happen at runtime and Xamarin uses a lot of that Also abuse of abstraction layers is what makes your programs slow, most of the time, wich Xamarin and now MAUI does a lot too, that's what you get for abusing OOP In server they could get away with it thanks to their JIT, since they don't care about cold start But in AOT scenarios, you depend a lot on the quality of the AOT compiler, how well it does optimizations, and how well your code is written to facilitates good optimizations Again, MAUI is open source, check their code, you'll understand what i mean by "the code is just slow" People always forget what they program for, mobile devices are constrained devices with constrained resources Pumping your desktop PC and claiming your benchmark does well doesn't automatically translate to better perf on mobile Then people wonder why their app drain the battery so fast, and you get 1 star reviews as a result, people doesn't care, that is why i leave 1 star reviews, most of the time
- kaba0 6y agoThat’s just absolutely baseless on so many levels
- Shadonototro 6y agoMAUI is open source, check their code Apple mentioned in their WWDC how they embraced data oriented code for SwiftUI wich gave them great performance by default
- kaba0 6y agoAnd how does OOP result in slower code?
- Shadonototro 6y agoindirections, abstraction cost, vtables, cache misses, slow datastructures etc etc etc you might not see it on your i9 with 64gb of memory but your mom's android phone will struggle
- kaba0 6y agoThere is nothing on this list inherent to OOP. I’m fairly sure C++ is an OOP language (okay, multi paradigm), and their use is “zero-cost” abstraction. Vtables are only necessary for virtual functions, and you similarly have to decide another function implementation if the business logic requires that. Indirection, cache misses do happen with some managed OOP language, but that is due to objects being pointers to heaps instead of stack-allocated. And slow data structures have yet again has nothing to do with it at all. I guess you mean datastructure containing pointers to objects, which is not always the case, and an implementation detail.
- colejohnson66 6y agoObjective C’s whole thing is based on calls to objc_msgSend instead of directly to the intended function. And yet, the first iPhone (running at 400 MHz) handled it fine.