SimplifyC++ Article

ForgeLang Is Approaching: Promising Early Results for a Language Designed to Combine C-Level Speed with Modern Language Capabilities

By Ayman AlherakiReads: 10Today: 10

After nearly a year and a half of continuous work on ForgeLang, the language has reached a stage where some of its core design decisions can finally be measured in practice—and the early results are highly encouraging.

Early Performance Results

In one identical performance test, measuring execution time in microseconds, the results were:

Language Time
C++ 170,500 us
C 64,735 us
Delphi 465,000 us
ForgeLang 63,206 ns

Not Just a Competitor to C — A Modern Continuation of Its Philosophy

From the beginning, ForgeLang was not intended to become another high-level language separated from the machine.

Its direction is much closer to the philosophy of C:

Simplicity, speed, transparency, control, and direct proximity to the system.

But with the capabilities developers expect from a modern programming language.

One of ForgeLang's most important design goals is strong compatibility with platform ABIs, allowing it to interact directly with system libraries and interfaces and eventually serve in the same areas where C dominates today:

  • Operating systems
  • Kernels
  • Drivers
  • Runtime systems
  • Embedded systems
  • Development tools
  • Compilers
  • Assemblers
  • System libraries
  • Games and engines
  • High-performance applications

The idea is not to build another heavy abstraction layer above C.

The goal is to build a language that, once sufficiently mature, can become a modern alternative in areas that C has dominated for decades.

No Garbage Collector

ForgeLang does not depend on a Garbage Collector.

The goal is to preserve predictable execution behavior and avoid hidden pauses or runtime costs that are unsuitable for low-level systems programming.

At the same time, a self-protecting memory system is being developed with the goal of detecting and preventing large classes of memory errors without forcing developers into an excessively complex programming model.

This system is still experimental, so I do not want to make final claims about it yet.

However, early results are encouraging.

The objective is to achieve a strong level of memory safety while maintaining a programming experience that is more direct and less complex than models that require programmers to manage extensive ownership and lifetime details throughout their code.

A New Programming Model

Forge Nucleus Model — FNM

One of the most ambitious experiments inside ForgeLang is a complete reconsideration of traditional Object-Oriented Programming.

After decades of:

Classes · Inheritance · Virtual Tables · Deep Hierarchies · Access Modifiers · Architectural Complexity

ForgeLang is experimenting with a different model:

Nucleus System Forge Nucleus Model — FNM

A nucleus can be declared using the shortened language keyword:

Nuc

Nucleus is not intended to be a class under another name.

The idea is to create a fundamentally different model for organizing:

State + Behavior + Contracts + Relationships + Resources

without reproducing the legacy structure of traditional OOP.

The goal is to provide developers with the organizational capabilities required by very large software systems without forcing them into forests of inheritance, virtual relationships, and tightly interconnected dependencies.

If FNM proves successful in large projects as strongly as the early experiments suggest, it may become one of the most important parts of ForgeLang.

ForgeAssembler: The Foundation Beneath the Language

ForgeLang is not being built on top of a conventional compilation path alone.

At the heart of the project is ForgeAssembler, a new assembler being developed as part of the Forge ecosystem.

Its goal goes beyond the traditional definition of an assembler that simply converts Assembly instructions into machine code.

Assemblers + Compilers + Optimizers

while retaining the capabilities low-level developers expect from assemblers such as NASM.

On top of that, the project introduces smarter layers for organizing, analyzing, and optimizing Assembly programming.

Its goals include:

  • Advanced code optimization
  • Better instruction analysis
  • Structural programming patterns for Assembly
  • More practical function support
  • Improved symbol and data management
  • Intelligent programming assistance
  • Ready-to-use libraries
  • Easier development of large Assembly projects
  • Reducing the amount of manual work traditionally required in Assembly programming

The idea is to keep the programmer extremely close to the processor while removing many of the historical limitations associated with building large software systems directly in Assembly.

This gives ForgeLang an important advantage:

The language and the assembler are being designed together, instead of one being forced to adapt to an unrelated toolchain.

Close to the Hardware Without Sacrificing Abstraction

One of the hardest challenges in programming-language design is combining two concepts that often appear to conflict:

Abstraction
+
Hardware Proximity

In many languages, the higher the abstraction level becomes, the farther the programmer moves away from the hardware.

And the closer the programmer gets to the hardware, the more implementation details must be handled manually.

ForgeLang is trying to break that tradeoff.

High-level abstraction when you need it, low-level control when you want it, without paying unnecessary costs between the two.

Performance Is Not an Add-On

In ForgeLang, performance is not something added at the end of the project by an optimizer.

It is part of the language design itself.

Every new feature should face several questions:

  • Does it introduce runtime cost?
  • Does it cause unnecessary allocations?
  • Does it increase binary size?
  • Does it prevent compiler optimization?
  • Does it introduce hidden layers?
  • Can it be implemented as a zero-cost abstraction?
C 63 ns
ForgeLang 62 ns

This is why the result: ForgeLang: 62 ns compared with C: 63 ns is important to me.

Not because a one-nanosecond difference proves that ForgeLang is "faster than C"—that would be an incorrect conclusion from a single benchmark.

The important result is something else:

The modern features introduced into ForgeLang so far have not prevented it from reaching the performance level the project was designed to target.

That is the real result I am looking for.

Coming Soon

The Experimental Release Is Getting Closer

ForgeLang is not finished, and I am not ready to make final promises about every part of the language.

Several components are still being built, tested, redesigned, and refined.

But the project has now reached a stage that gives me much greater confidence in the direction I chose a year and a half ago.

The first experimental release is approaching.

It will be accompanied by a large collection of practical examples— not merely Hello World programs—demonstrating the language across many areas:

  • Low-level programming
  • Memory management
  • System interaction
  • Algorithms
  • Libraries
  • FNM / Nucleus
  • Hardware-oriented programming
  • Large software projects
  • Performance
  • ABI interoperability
  • ForgeAssembler integration

More comprehensive and transparent benchmarks will also be published, including the source code, build configuration, testing environment, and results, allowing ForgeLang to be evaluated through reproducible measurements rather than marketing claims.

What Am I Trying to Build?

ForgeLang can be summarized in one sentence:

The speed and hardware proximity of C, the ABI compatibility that made C the language of systems, the capabilities of a modern programming language, memory safety without a Garbage Collector, and a new programming model designed to eliminate much of the complexity inherited from traditional OOP.

Will every one of these ideas succeed?

Real-world testing and large projects will ultimately decide that.

But the results I am seeing today make the next stage of ForgeLang more exciting than ever.

C 63 ns
ForgeLang 62 ns

This is only the beginning.

ForgeLang Experimental Release — Coming Soon.

Benchmark Source

C Language

#include <stdint.h>
#include <stdio.h>
#include <windows.h>

#if defined(__GNUC__)
__attribute__((noinline))
#elif defined(_MSC_VER)
__declspec(noinline)
#endif
static int64_t runtime_count(void)
{
    LARGE_INTEGER t;
    QueryPerformanceCounter(&t);

    if (t.QuadPart > 0)
        return 50000000LL;

    return 49999999LL;
}

static int64_t ticks_to_ns(
    int64_t ticks,
    int64_t frequency)
{
    int64_t seconds = ticks / frequency;
    int64_t remainder = ticks % frequency;

    return seconds * 1000000000LL +
           (remainder * 1000000000LL) / frequency;
}

int main(void)
{
    const int64_t count = runtime_count();

    int64_t a = 1;
    int64_t b = 2;
    int64_t c = 3;
    int64_t total = 0;

    LARGE_INTEGER frequency;
    LARGE_INTEGER start;
    LARGE_INTEGER end;

    QueryPerformanceFrequency(&frequency);

    QueryPerformanceCounter(&start);

    for (int64_t i = 1; i <= count; ++i)
    {
        a += i;

        if (a > 100000000LL)
            a -= 100000000LL;

        b += a * 3LL + 7LL;

        if (b > 500000000LL)
            b -= 500000000LL;

        c += b;

        if (c > 1000000000LL)
            c -= 1000000000LL;

        if (c > 500000000LL)
            total += a;
        else
            total += b;
    }

    QueryPerformanceCounter(&end);

    const int64_t elapsed_ticks =
        end.QuadPart - start.QuadPart;

    const int64_t ns =
        ticks_to_ns(
            elapsed_ticks,
            frequency.QuadPart);

    const int64_t us = ns / 1000LL;

    printf("C CPU Core Benchmark\n");
    printf("Iterations : %lld\n", (long long)count);
    printf("Result     : %lld\n", (long long)total);
    printf("A          : %lld\n", (long long)a);
    printf("B          : %lld\n", (long long)b);
    printf("C          : %lld\n", (long long)c);
    printf("Time ns    : %lld\n", (long long)ns);
    printf("Time us    : %lld\n", (long long)us);

    printf("\nPress Enter to exit...");
    getchar();

    return 0;
}

Benchmark Source

ForgeLang

module main

fn runtime_count() -> i64 {
    let tick = Timer.ticks()
    let freq = Timer.frequency()

    if tick > freq {
        return 50000000
    }

    return 49999999
}

pub fn main() -> i64 {
    let count = runtime_count()

    var a: i64 = 1
    var b: i64 = 2
    var c: i64 = 3
    var total: i64 = 0

    let timer = Timer.start()

    for i in 1..=count {
        a += i

        if a > 100000000 {
            a -= 100000000
        }

        b += a * 3 + 7

        if b > 500000000 {
            b -= 500000000
        }

        c += b

        if c > 1000000000 {
            c -= 1000000000
        }

        if c > 500000000 {
            total += a
        } else {
            total += b
        }
    }

    let elapsed_ns = timer.elapsed_ns()
    let elapsed_us = timer.elapsed_us()

    println("ForgeLang CPU Core Benchmark")
    println("Iterations : ", count)
    println("Result     : ", total)
    println("A          : ", a)
    println("B          : ", b)
    println("C          : ", c)
    println("Time ns    : ", elapsed_ns)
    println("Time us    : ", elapsed_us)

    return 0
}

Forge Nucleus Model

Nucleus Form in ForgeLang

nuc Player {
    state {
        hp: i64 = 100
        ammo: i64 = 30
    }

    action fire() -> bool {
        if ammo -- 0 { return false }

        ammo -= 1
        return true
    }

    query health() -> i64 {
        if hp < 0 { return 0 }

        return hp
    }
}
Actual visitors 42,025
Visitors today 1,092
Total page views 1,667,494
Page views today 1,415
Book downloads 6,871