Hacker News new | past | comments | ask | show | jobs | submit login

The main issue would be fixing the problem of pointers; high-performance code is hard to write in C because of pointer aliasing. Rust has an interesting approach in its ownership model but I think a performance-oriented C evolution would require another more general solution.

ANSI rules for aliasing, plus the restrict keyword go a long way to address this.

Yes. Pointers are only a problem if you do things with them that confuses the compiler.

As someone who writes C code that needs maximum performance (my problem is cpu bound) the two biggest performance gains were moving to icc (Intel’s compiler) and writing my own thread-safe memory pool allocator to avoid malloc.

What are your use cases that require this kind of performance? High performance order matching or other trading/financial applications?

DNA sequencing data processing [1]. It is a hard problem that needs a lot of processing power thrown at it to solve.

1. https://www.nucleics.com/peaktrace/peaktrace-basecaller-over...

In Myrddin[1], the code is amenable to loop versioning -- All references are bounded, one way or the other. Either you have a raw pointer, which is bounded by the size of the type, or you have a slice, which carries with it a length. This allows you (or the compiler) to trivially write an 'aliases(a, b)' predicate, which allows the compiler to write something like:

    if aliases(a, b)
Considering that this language seems to also keep track of bounds on the pointers, you could probably do something similar.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact