пятница, 9 апреля 2010 г.

iPad vs iPhone 3GS tests

Первоисточник: http://furbo.org/2010/04/03/benchmarking-in-your-lap/

Native performance

Test iPad/3.2 iPhone 3GS/3.0 Faster by
100,000 iterations 0.000035 secs. 0.000137 secs. 3.91x
10,000 divisions 0.000010 0.000018 1.8x
10,000 sin(x) calls 0.000012 0.000018 1.5x
10,000 string allocations 0.004321 0.007915 1.83x
10,000 function calls 0.000338 0.000600 1.78x

This first benchmark compares the native performance of the iPad against the iPhone 3GS. The version of the iPhone OS is the one originally released with both devices (3.2 and 3.0, respectively.) The application used to test the devices was a release (optimized) build for ARM v7.

On average, the iPad is about twice as fast as the iPhone 3GS when executing native (Cocoa Touch) applications. Great news for developers, because it gives us much more flexibility when creating our apps.

JavaScript performance

Test iPad/3.2 iPhone 3GS/3.0 Faster by
100,000 iterations 0.011 secs. 0.017 secs. 1.55x
10,000 divisions 0.006 0.012 2.00x
10,000 sin(x) calls 0.009 0.024 1.85x
10,000 string allocations 0.007 0.017 2.43x
10,000 function calls 0.005 0.006 1.20x

Oddly, the same 2x improvement is not seen for the same benchmarks when executing JavaScript code in web pages. Again, the iPad with 3.2 is compared against the iPhone 3GS with 3.0. Things have definitely improved, but there was a wide variation in results when performing the tests. I suspect that just-in-time compilation or other similar types of caching are affecting the results.

The raw numbers really don’t matter anyway: the browser experience on the iPad is exceptional (and will only get better.)

Native performance: Original iPhone vs. iPad

Test iPad/3.2 iPhone/2.0 Faster by
100,000 iterations 0.000035 secs. 0.015 secs. 428x
10,000 divisions 0.000010 0.004 400x
10,000 sin(x) calls 0.000012 0.105 8,750x
10,000 string allocations 0.004321 0.085 20x
10,000 function calls 0.000338 0.004 12x

четверг, 8 апреля 2010 г.

iPhone OS 4.0 beta - очень сырой релиз

SDK и XCode установились удачно, можно скомпилить код и запустить,
но пару раз дабликликнув на Home в симуляторе (появится список активных приложений), а затем выход из списка по однократному нажатию Home - видим черный экран и статус бар сверху. Все, кирдык.

Установка Firmware на реальный девайс тоже не получилась. Для IPod touch всех модификаций тотально сервер яблок не дает разрешения на установку (при том что имеющаяся прошивка уже снесена).
Только восстановление на предыдущую версию и помогает.

Судя по девфоруму - проблемы есть и у обладателей айфонов, причем с английскими операторами они могут вообще прекратить работать (то ли в симмке что-то расширенное используется, то ли еще чего)

Вобщем до следующего релиза можно отдыхать и курить доки. А яблочные девелоперы до лета будут не спать. А потом не спать до осени чтобы это все еще и на айпад перенести.

Ужс.

P.S. в симуляторе появилась эмуляция TV выхода с различными разрешениями вплоть до 720p - показывается в отдельном окне.

iPhone OS 4.0 анонсирована!

что в ней появится - можно прочитать на каждом заборе,
а вот тот факт что SDK и прошивки уже доступны для девелоперов не радовать не может!

Multitasking

In iPhone OS 4.0 and later, applications can perform tasks while running in the background. When the user quits an application, instead of its process being terminated, the application is moved to the background. Shortly after moving to the background, most applications are suspended so that they do not run and consume additional power. However, applications that need to continue running can ask the system for the execution time to do so.

Regardless of whether an application is running in the background or suspended, the fact that the application is still in memory means that relaunching the application takes much less time. An application’s objects (including its windows and views) normally remain in memory and therefore do not need to be recreated when the application is subsequently relaunched by the user. However, if memory becomes constrained, the system may purge background applications to make more room for the foreground application. To appear consistent with the application remaining in the background at all times, an application should store information about its current state when it moves to the background and be able to restore itself to that state upon a subsequent relaunch.

суббота, 3 апреля 2010 г.

На первый невооруженный девелоперский взгляд, процессор IPad (A4 1GHz) быстрее процессора IPhone 3GS (Cortex A8 600MHz) в целочисленных вычислениях в два раза.

Субьективно по впечатлениям уважаемого Alexmak и на его видео - раза в полтора точно (невзирая на резко увеличившийся размер экрана). http://www.youtube.com/watch?v=PTteFA7XGQQ

Вот с RAM пока не все понятно. iFixit, разобрав девайс говорят, что там 512МБ памяти.
Девелоперы, которые писали первые тесты говорят, что функции сообщают им о наличии только 256МБ (как и на IPhone 3GS/IPod Touch3G). Подождем подробностей. То ли половина теперь видеопамять, то ли для совместимости функции пока врут.

Первоисточник: http://forums.macrumors.com/showthread.php?t=888812

четверг, 1 апреля 2010 г.

Как обычно, благими намерениями устлана дорога сами знаете куда.
А посему сравнение эмуляторов-симуляторов снова откладывается, но на сладкое и вкусное у нас есть интересное сравнение быстродействия iPhone 3G и 3GS, а стало быть и iPod Touch 2G и 3G.

Первоисточник: http://aussiebloke.blogspot.com/2010/01/micro-benchmarking-2nd-3rd-gen-iphones.html

iPhone 3G

ARM1176 ~412MHz / 2.4ns per cycle

NameIterationsTotal time (sec)Time per (ns)
IMP-cached message send1000000003.938.6
C++ virtual method call1000000005.049.9
Floating-point division100000000.881.3
Float division with int conversion100000000.881.4
16 byte memcpy100000001.4136.0
Objective-C message send10000000014.9148.6
Integer division10000000016.2162.2
CF CFArrayGetValueAtIndex100000002.0201.7
Objective-C objectAtIndex:100000004.2418.3
NSInvocation message send1000000.21833.2
16 byte malloc/free1000000027.32729.8
NSObject alloc/init/release1000001.414179.1
NSAutoreleasePool alloc/init/release1000001.918956.7
16MB malloc/free10000.047811.3
Zero-second delayed perform10000.8803419.3
pthread create/join1000.11085830.0
1MB memcpy1001.09902796.7

iPhone 3GS (ARMv7 binary)

ARM Cortex A8 ~600MHz / 1.66 ns per cycle

NameIterationsTotal time (sec)Time per (ns)
IMP-cached message send1000000001.211.8
C++ virtual method call1000000004.342.9
Objective-C message send1000000005.959.2
CF CFArrayGetValueAtIndex100000001.097.9
Integer division1000000009.898.4
16 byte memcpy100000001.1109.3
Floating-point division100000001.2118.5
Objective-C objectAtIndex:100000001.3129.0
Float division with int conversion100000001.4142.6
16 byte malloc/free100000007.5748.6
NSInvocation message send1000000.1806.0
NSObject alloc/init/release1000000.54793.1
NSAutoreleasePool alloc/init/release1000000.54953.1
16MB malloc/free10000.017969.2
Zero-second delayed perform10000.2211840.4
pthread create/join1000.0214742.5
1MB memcpy1000.33162774.6

Пропускная способность памяти:

iPhone 3G - 200MB/s
iPhone 3GS - 800Mb/s