Skip to content

Comment on C Runtime Overhead

Comments

Now imagine the speed if you could get rid of the syscall overhead. You would have to write a lot more code (and it probably wouldn't run on Linux due to trying to access protected memory locations or IO ports), but it would be significantly faster.

Aah, the promise of the Exokernel[1].

[1] http://u.cs.biu.ac.il/~wiseman/2os/microkernels/exokernel.pd...

The HPC guys use OS-Bypass to avoid system calls. [0]

Ron Minnich presented a paper at the Plan9 conference

Using Currying and process-private system calls to break the one-microsecond system call barrier [1]

Which is a technique he's been using on Blue-Gene. There are some more papers linked from the IBM Research website. [2]

[0] http://www.networkworld.com/article/2317965/tech-primers/os-...

Sorry the conference repository server is awol, all I could find is this :

[1] https://www.yumpu.com/en/document/view/7777923/using-curryin...

[2] http://researcher.watson.ibm.com/researcher/view_group_pubs....

Well, when I started programming, C and Pascal execution speed were looked down like managed runtimes are still nowadays.

Serious application development for consumer computers was done in straight Assembly. Anything higher than that was "scripting". :)

Back when digital, electronic computers were new, assembly was called "automatic programming".

Good old Autocode. Finally you didn't need to enter all instructions by number, it was considered a great leap forward at the time...

The first autocode and its compiler were developed by Alick Glennie in 1952 for the Mark 1 computer at the University of Manchester and is considered by some to be the first compiled programming language. His main goal was to make the programming of Mark 1 machine, known for its partcularly abstruse machine code, comprehensible. Although the resulting language was much clearer than the machine code, it was still very machine dependent.

From: https://en.wikipedia.org/wiki/Autocode

Funny that I felt the scripting side of while reading some projects like wmii, or some plan9 utils. I'm under the impression that in UNIX early days, C was almost a rapid prototyping / scripting language.

The promise of TempleOS!

I had to implement buffered IO due to syscall overhead (the CTF solution called fgetc() and relied on libc's buffering for speed). My first working non-buffered test took on the order of seconds and made several thousand syscalls. When I mentioned optimistically buffered IO, that was "just flush on EOF, don't even look for newlines". Reducing the syscall count definitely helped.

And The Interrupt List!!! (Ralph Brown's)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.