Unnamed
public cpp v1 · immutable#include <time.h>#include <math.h>int main(const int argc, const char* argv) { clock_t t; float f = 2.0f; float s1, s2; t = clock(); for(int i=0;i<100000000;i++) { s1 = powf(f, 2); } t = clock() - t; s1 = (float)t / CLOCKS_PER_SEC; t = clock(); for(int i=0;i<100000000;i++) { s2 = f * f; } t = clock() - t; s2 = (float)t / CLOCKS_PER_SEC; return 0;}