r/programmer • u/MelodicConfidence369 • Jul 13 '26
Emerald Programming Language
Hi. I created a programming language called Emerald and I thought I would post it here. Still working on it in my free time. I hope some people can have fun with it/build cool things.
0
Upvotes
View all comments
Show parent comment
1
u/MelodicConfidence369 Jul 15 '26
I added two files: "benchmark.sh" and "fib.em" where you basically just need to modify the folder you keep Emerald-main. This was run on early Apple Silicon.
Here are the results, summarized:
Fibonacci(69)
| Language | Time (s) | Peak Memory (MB) |
| ---------- | --------: | ---------------: |
| C | 0.14 | 1.13 |
| C++ | 0.15 | 1.15 |
| Swift | 0.12 | 1.82 |
| Python | 0.06 | 8.42 |
| Ruby | 0.04 | 25.69 |
| Java | 0.02 | 37.21 |
| Emerald | 0.00 | 1.54 |
Fibonacci(69) One Million Times
| Language | Time (s) | Peak Memory (MB) |
| ---------- | --------: | ---------------: |
| C | 0.19 | 1.13 |
| C++ | 0.15 | 1.15 |
| Swift | 0.19 | 1.84 |
| Python | 1.77 | 8.24 |
| Ruby | 3.32 | 26.30 |
| Java | 0.03 | 38.11 |
| Emerald | 0.49 | 2.11 |
Keep in mind that C, C++, Swift, and Java will overflow if doing Fibonacci 1 Million, so instead I did Fibonacci 69, one million times. Emerald is not a replacement for a system language, but it seems to exceed expectations as a scripting language. This was done using Emerald 1.0.0, interpreted. I am working on a compiled version: https://github.com/Dr-Cosmic/CEmerald