|
|
Log in / Subscribe / Register

C, still?

C, still?

Posted Sep 20, 2017 5:34 UTC (Wed) by Cyberax (✭ supporter ✭, #52523)
In reply to: C, still? by eru
Parent article: Building the kernel with Clang

Kernel is nothing special. Most of the code in Linux is bog-standard C code, except that it uses somewhat unusual "standard library". Rewriting it in something more expressive would easily allow to reduce the kernel size by 2-3 times, if not more.

Truly low-level code is a very small percentage of Linux.

But anyway, Linux is not going to be rewritten in anything any time soon.


to post comments

C, still?

Posted Sep 20, 2017 7:30 UTC (Wed) by smurf (subscriber, #17840) [Link] (1 responses)

I assume you're talking about size of the source code, not the resulting objects.

C, still?

Posted Sep 20, 2017 7:32 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

Sure, but text size also shouldn't be _too_ large.

C, still?

Posted Sep 20, 2017 9:21 UTC (Wed) by NAR (subscriber, #1313) [Link]

On the other hand compiling C is fast but compiling C++ is slooow. In my experience most compilation times were in the coffee-break range, but if a common header was modified (fix documentation comments, add private fields), it was lunch-break time. Pre-compiled headers might help, but I don't know how much. And although modern C++ with all those move semantics can be really effective, it can also be really complicated...


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds