Our chat app idles at 0.3% CPU in PHP 8.5 and 8.62% in React Native, both measured on a Galaxy S10

We rebuilt Zé Chat in typed PHP on PAM Native, with no JavaScript runtime involved, and measured it against the React Native build on the same phone, including the four tests PAM lost.

Leave a chat app open on the screen and stop touching it. Nothing is happening, yet the CPU keeps waking up. In our React Native build of Zé Chat, that was 3,543 wakeups per minute with the app sitting idle. The JavaScript engine, the bridge and the timers keep running, and the user's battery pays for it.

We rebuilt the same app on PAM Native, our open-source framework for Android and iOS apps in typed PHP 8.5. Idle on screen, it wakes the CPU 130 times per minute.

This post covers how PAM Native works, the numbers we measured on a real phone, the four tests where it lost, and what our numbers don't tell you.

How we measured

  • App: Zé Chat, one build in React Native and one on PAM Native.
  • Device: a real Samsung Galaxy S10.
  • Date: Oct 15, 2026.
  • Method: each value is the median of 3 runs.

We also ran a separate synthetic suite. It used a minimal app built as fully native, on PAM, and on React Native 0.85.3 (Hermes), on an Android 16 emulator. We keep the two sets of results apart below because they measure different things.

What runs where

PAM Native has no JavaScript runtime, no WebView and no DOM. Code reaches the screen through three layers:

  • PHP describes the UI with stateful components (#[State]), actions and Laravel-style routes.
  • Rust validates the tree, computes the diff between one screen and the next, and runs layout.
  • Kotlin and Swift apply only the needed changes to real Android Views and UIKit controls, on the UI thread.

PHP itself runs on PAM, a persistent runtime written in Rust. Your app stays in memory. It isn't started up and torn down on every request the way classic PHP is.

Here is the counter component from the README (it's not Zé Chat code):

<?php use Pam\Native\Attributes\State; use Pam\Native\Component; final class Counter extends Component { #[State] public int $count = 0; public function increment(): void { $this->count++; } } ?> <template> <Column class="counter"> <Text class="eyebrow">LIVE NATIVE STATE</Text> <Text class="value">{{ $count }}</Text> <Button label="Increment" @press="increment" /> </Column> </template> <style scoped> .counter { padding: 24px; gap: 16px; align-items: center; } .eyebrow { font-size: 12px; font-weight: 700; } .value { font-size: 56px; font-weight: 800; } </style> 

When the user taps the button, PAM sends the event to the persistent PHP component and updates #[State]. It then renders the next typed tree, computes the minimal diff in Rust and commits only that change to the native view:

native event → PHP action → reactive state → Rust diff → UI-thread commit 

Native animations and gestures (tap, pan, pinch, rotate, swipe, long-press) run without per-frame traffic through PHP.

Idle: where the gap is widest

A phone app spends most of its life open but not doing anything, so this is where we looked first.

Idle metric PAM React Native Difference
CPU on screen 0.3% 8.62% 28.7x less
Wakeups per minute 130 3,543 27.3x fewer
CPU in background 0.11% 5.26% 47.8x less
Battery, 10 idle minutes 0.05 mAh 0.66 mAh 13.3x less

Memory

  • At rest: 166 MB on PAM vs. 444 MB on RN, 2.7x less.
  • After navigating through the app: 394 MB vs. 993 MB.

After the same navigation, the PAM build stays under 400 MB and the RN build is close to 1 GB.

Startup, search and scrolling

  • Icon tap to inbox: 449 ms vs. 869 ms, almost 2x faster.
  • First frame drawn: 213 ms vs. 307 ms.
  • Search, keypress to filtered list: 51 ms vs. 133 ms.
  • Janky frames while scrolling a chat: 1.28% vs. 9.9%, 7.7x fewer.

The first frame is only 94 ms apart. On scrolling, roughly one frame in ten janks on RN and about one in 80 on PAM.

The APK is 73 MB on PAM vs. 91 MB on RN.

The four tests PAM lost

If a benchmark only shows wins, you shouldn't trust it. These are the results where PAM is behind:

  • A 10,000-item list: 991 ms on PAM vs. 654 ms on RN.
  • Video playback: 61% CPU vs. 55%.
  • Reopening the app: more network traffic, 26 KB vs. 5.2 KB.
  • Keypress to pixel filtering, synthetic suite: 70.5 ms vs. 49.1 ms.

The last one can look like it contradicts the Zé Chat search result above (51 ms vs. 133 ms in PAM's favor), but the two results come from different tests. In the synthetic suite, RN wins. In the real chat app, PAM wins. We're reporting both.

Synthetic suite results

The minimal app (native vs. PAM vs. React Native 0.85.3 with Hermes, Android 16 emulator) gave us two more numbers:

  • APK size: 15.6 MB on PAM vs. 32.2 MB on RN, about half.
  • Pure computation: SHA-256 ran 54x faster than on Hermes, and json_encode 12.7x faster.

Don't read too much into the second result. It doesn't mean PHP code in general runs 54x faster than JavaScript. hash() and json_encode() are implemented in C, so that work lands directly in PHP's C functions. Your own business logic written in PHP won't see that kind of gap.

What our numbers don't tell you

  • One device, 3 runs. Every Zé Chat number comes from a single Galaxy S10. Other phones will give other results. If you compare frameworks yourself, use a real device and take the median of several runs, not a single run.
  • Candidate builds. Some PAM numbers come from candidate builds that are not in the public release yet.
  • A fully native app is still the ceiling. When there's UI on screen, PAM gets close to native. The big gaps against RN show up when the app is idle.
  • Platform coverage. Android and iOS are ready and in production use. Android TV (remote-control navigation, focus handling, TV safe areas) is done and in final validation before release. Apple TV (tvOS) and Samsung and LG TVs (Tizen and webOS) are the next phases on the roadmap. Desktop (Linux, macOS, Windows) is handled by a sibling project, PAM Desktop, which is in alpha.

What else ships with it

  • Nitro: a separate package (github.com/push-in/pam-native-nitro), not built into the core: an offline-first local database with reactive queries. Extra capabilities like this are added with pam composer require pushinbr/pam-native-<capability>.
  • Sync: offline-first sync with an idempotent outbox, conflict policies and a ready-made Laravel server counterpart.
  • UI: native components with tokens, themes and animations.
  • Observability: traces, metrics, logs and crash context, with no vendor lock-in.

Trying it

PAM Native is licensed under Apache-2.0. Create an Android + iOS project from the native template:

pam init my-native-app --template native 

The template already adds pushinbr/pam-native ^1.0 to composer.json.

If you already write PHP, you know most of what you need to ship a native app to the Play Store and the App Store.

The code is at github.com/push-in/pam-native. If you run it on your own device and get different numbers from ours, please open an issue with the device and the test you ran. If you find the project useful, a star lets us know.