|
|
Subscribe / Log in / New account

Clang builds a working 2.6.36 Kernel

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 14:37 UTC (Tue) by juliank (guest, #45896)
In reply to: Clang builds a working 2.6.36 Kernel by tzafrir
Parent article: Clang builds a working 2.6.36 Kernel

> It also becomes way faster in gcc (4.4.5 here) once
> you remove "__attribute__((noinline))". This looks
> like a simpler explanation for the simpler code you posted there.

Then gcc calculates the result of f() at compile-time and just has a constant integer in the assembler code. Clang does not appear to do this (there's callq f in clang's assembly)


to post comments

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 16:29 UTC (Tue) by gmaxwell (guest, #30048) [Link] (3 responses)

"Clang 100x faster than GCC!"

"But.. why did you handicap GCC?"

"Cause if I didn't GCC was much faster!"

(just saying… :) )

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 16:31 UTC (Tue) by juliank (guest, #45896) [Link] (1 responses)

> "Clang 100x faster than GCC!"
> "But.. why did you handicap GCC?"
> "Cause if I didn't GCC was much faster!"
> (just saying… :) )

GCC 4.5 at -O3 is as fast as clang, although not if you call the function via a pointer. GCC 4.4 has the same slow speed at -O2, -O3, -O4, -O9.

Clang builds a working 2.6.36 Kernel

Posted Oct 27, 2010 9:27 UTC (Wed) by jwakely (subscriber, #60262) [Link]

-O4 and -O9 don't exist, no surprise they aren't any better than -O3

GCC 4.5 has apparently already improved. Are you also comparing with a version of Clang from 18 months ago, when GCC 4.4 was released?

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 21:47 UTC (Tue) by tzafrir (subscriber, #11501) [Link]

To make this "handicap" more realistic, replace the constant with a command-line parameter.


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