Clang builds a working 2.6.36 Kernel
Posted Oct 26, 2010 12:32 UTC (Tue) by
juliank (subscriber, #45896)
In reply to:
Clang builds a working 2.6.36 Kernel by jwakely
Parent article:
Clang builds a working 2.6.36 Kernel
> compiles 100 times faster or runs 100 times faster?
Run time. The following code runs much faster when compiled clang++ (0.003s) than when compiled using g++ (1.593s):
#include <iostream>
#include <boost/thread.hpp>
#define len 1000000000L
static void f(unsigned long a, unsigned long b, unsigned long *va)
{
for (*va = 0; a < b; a++)
*va += a;
}
int main()
{
unsigned long va = 0;
boost::thread a(f, 0l, 2* len, &va);
a.join();
std::cout << va << std::endl;
return 0;
}
(
Log in to post comments)