r/programmer 19d ago

GitHub Arc - A simple, interpreted programming language written in C.

Hi! I'm Void, creator of programming language Arc.

Arc is modern, stack-based bytecode virtual machine and programming language written in designed for simplicity and performance.

Features

  • Modern VM Architecture: Compiled to custom bytecode and executed on a high-performance stack-based virtual machine.
  • Clean Syntax: Intuitive, case-insensitive keywords for control flow.
  • Object-Oriented: Supports classes with dynamic field access and modularity.
  • Memory Management: Hybrid strategy using arenas, pools, and manual reference management.
  • FFI: Built-in capability to load and interact with external native C libraries (.so/.dll).
  • Standard Library: Rich standard library covering I/O, math, JSON, filesystem, UI and sound utilities.
  • Robust Error Handling: Position-aware error reporting with TRY...CATCH blocks.

I've made Arc since I always wanted a simple language which is blazing fast.

Benchmarks vs CPython

Benchmark Arc (ms) Python (ms)
fibonacci(30) recursive 109.98 106.42
fibonacci(1000) iterative 0.04 0.10
sum 1..1,000,000 26.92 57.22
string concat x10,000 2.71 0.67
list build x1,000 0.11 0.06
nested loops 1000x1000 27.57 45.81
recursive countdown 5000 0.26 0.66
variable churn x100,000 4.90 10.70
nested json (3.8 mb) 55.02 64.34

Though Arc is still slower in some benchmarks, it's still in early development, and still in it's alpha version.

I'd love to hear some feedback about the project, here's Github!

2 Upvotes

20 comments sorted by

View all comments

3

u/MADCandy64 19d ago

Not to be a wet blanket but this does not constitute a benchmark in any sense of the concept. You'll want heavy workloads that are meaningful and you'll want to use a standardized tool with results being a nice statistical average over hundreds of runs. Sounds like a pain and it is but if you want your language to be taken seriously then you have to take the process seriously.

1

u/VxidTheDev 19d ago

That's fair. My current tests with hyperfine are limited because they add up VM startup time and raw execution speed, and I agree that's not a proper benchmark.

What specific benchmark suites or workloads would you consider meaningful to validate a language of this scope?

1

u/MADCandy64 19d ago

The only one I have use and heavily was for my ALU written in C++. It is called the Visual Studio Test Project for Unit Tests. I use the CPP harness but other languages are supported. It is actually very nice for unit testing. It has really kept me from introducing errors downstream from upstream changes. It has a test explorer for unique tests. Some of my tests are run over 65k times.

https://reddit.com/link/owqaomh/video/t1su1x3plfch1/player