JAX's performance edge in Keras 3.0 on GPUs and TPUs primarily comes from its deep integration with the XLA (Accelerated Linear Algebra) compiler for automatic kernel fusion and Just-In-Time (JIT) compilation, which transforms Python code into highly optimized machine instructions for accelerators.