Skip to content

try to beat LuaJIT #9

@wtholliday

Description

@wtholliday

Current benchmark results:

  ┌─────────────────┬────────┬─────────────┐                                                                                                                                             
  │     Backend     │  Time  │ vs Lyte JIT │                                                                                                                                             
  ├─────────────────┼────────┼─────────────┤                                                                                                                                             
  │ LuaJIT (JIT)    │ 0.035s │ 1.5x faster │                                                                                                                                             
  ├─────────────────┼────────┼─────────────┤                                                                                                                                             
  │ Lyte JIT        │ 0.054s │ 1x          │
  ├─────────────────┼────────┼─────────────┤
  │ LuaJIT (interp) │ 0.361s │ ~7x slower  │
  ├─────────────────┼────────┼─────────────┤
  │ Lua 5.5         │ 0.752s │ ~14x slower │
  ├─────────────────┼────────┼─────────────┤
  │ Lyte VM         │ 1.980s │ ~37x slower │
  └─────────────────┴────────┴─────────────┘

For the iOS case (no JIT allowed), LuaJIT's interpreter is ~5.5x faster than the Lyte VM. LuaJIT's interpreter benefits from a highly optimized bytecode dispatch loop written in
hand-tuned assembly. That's the gap to close for the Lyte VM on iOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions