|
|
|
|
ln -s /Archive2/e3/6a848c9464e0a6/main.cpp foo.cpp clang++ -std=c++14 -stdlib=libc++ -O3 -Wall -Wextra -pedantic-errors main.cpp foo.cpp -lsupc++ && ./a.out echo ============== && g++ -std=c++14 -O3 -Wall -Wextra -pedantic-errors main.cpp foo.cpp && ./a.out function pointer: 890000 processor clock ticks lambda (local): 430000 processor clock ticks lambda (extern): 430000 processor clock ticks ============== function pointer: 890000 processor clock ticks lambda (local): 420000 processor clock ticks lambda (extern): 410000 processor clock ticks |
ln -s /Archive2/e3/6a848c9464e0a6/main.cpp foo.cpp clang++ -std=c++14 -stdlib=libc++ -O3 -Wall -Wextra -pedantic-errors main.cpp foo.cpp -lsupc++ && ./a.out echo ============== && g++ -std=c++14 -O3 -Wall -Wextra -pedantic-errors main.cpp foo.cpp && ./a.out lambda (local): 880000 processor clock ticks lambda (extern): 440000 processor clock ticks function pointer: 460000 processor clock ticks ============== lambda (local): 890000 processor clock ticks lambda (extern): 420000 processor clock ticks function pointer: 440000 processor clock ticks |
ln -s /Archive2/e3/6a848c9464e0a6/main.cpp foo.cpp clang++ -std=c++14 -stdlib=libc++ -O3 -Wall -Wextra -pedantic-errors main.cpp foo.cpp -lsupc++ && ./a.out echo ============== && g++ -std=c++14 -O3 -Wall -Wextra -pedantic-errors main.cpp foo.cpp && ./a.out lambda (extern): 910000 processor clock ticks lambda (local): 430000 processor clock ticks function pointer: 490000 processor clock ticks ============== lambda (extern): 890000 processor clock ticks lambda (local): 420000 processor clock ticks function pointer: 430000 processor clock ticks |
function pointer: 527030 microseconds lambda (local): 318018 microseconds lambda (extern): 315018 microseconds |
function pointer: 500 millisecs lambda (local): 420 millisecs lambda (extern): 430 millisecs lambda (extern): 410 millisecs lambda (local): 410 millisecs function pointer: 470 millisecs ============== function pointer: 450 millisecs lambda (local): 430 millisecs lambda (extern): 430 millisecs lambda (extern): 420 millisecs lambda (local): 430 millisecs function pointer: 450 millisecs |