On Jun 17, 7:14 pm, LouisB <[email protected]> wrote: > Hello, i'm porting a 6502 Emulator to android. I have it working, but > only at roughly .3mhz (1 required.) After running the profiler I see > the simply reading memory (byte[]) is one of the most costly > operations. Does anyone have any ideas for speeding this up? Should > I wait for the NDK? Or is my G1 just underpowered.
Accessing an array shouldn't be all that expensive. If it's accessed through a class or object field, it's going to be slower. For example, this: byte b0, b1; b0 = mMemory.data[0]; b1 = mMemory.data[1]; is not as fast as: byte[] data = mMemory.data; byte b0, b1; b0 = data[0]; b1 = data[1]; Do you have an APK that demonstrates the performance? (We're always looking for a few good benchmarks.) Apple II or C64? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

