Math library function sqrt() is 10x slower in Ubuntu 14.04 compared to Ubuntu 12.04
Affects  Status  Importance  Assigned to  Milestone  

 The Marcola project 
Undecided

Manoj Iyer 
Bug Description
The function sqrt() which is a part of the gnu math library, 'libm' is 10x slower in Ubuntu 14.04 than in Ubuntu 12.04
Attached is a stand alone program which uses the sqrt() function from the libm library, and measures the time taken over 1 million times of invoking sqrt() of a random 'double' number.
The output of the program,when compiled and run in Ubuntu 12.04 is as below
SQRT(180428938
The output of the same program, compiled and run on 14.04 is as below
SQRT(1804289383
As you can see, for the same input value, the performance of sqrt() on Ubuntu 14.04 is > 10x smaller than that of 12.04.
Steps to reproduce:
Compile the attached file sqrt_example.c
gcc o sqrt_example sqrt_example.c lm lrt
Run the binary.
./sqrt_example
Sample Output
SQRT(1804289383
Changed in marcola:  
assignee:  nobody → Manoj Iyer (manjo) 