Skip to content

A simple benchmark to compare Lua to another popular languages

License

Notifications You must be signed in to change notification settings

fabiobarkoski/lua-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-benchmark

A simple benchmark to compare Lua and your compiler to another popular languages

Current compared Languages

  • C
  • Python

The Script

The script used in all of the languages is a simple loop that create a array and with that array we check if the item in the array is a prime number, if yes then append in another array

Benchmark

Languages Time in secs.
Python ~27.1
C ~1.0
Lua ~3.8
Luajit ~1.9

Run Scripts

To run the scripts type:

C

  gcc test.c -o test.sh

Then

  ./test.sh

Python

    python test.py

Or

    python3 test.py

Lua

    lua test.lua

Or if you want run compiled

    luajit test.lua

Links to languages websites

About

A simple benchmark to compare Lua to another popular languages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published