Benchmark for some floating point operations.

This program benchmarks the following operations:

  • 32-bit float mul, add, sub, div, neg.
  • 64-bit float mul, add, sub, div, neg.
NameTimeTicks
Empty bench (correction) 8 us[17]
Float mul (9) 3977 us[7955]
Float add (19) 3284 us[6569]
Float neg (-19) 1922 us[3844]
Float div (-197) 26241 us[52482]
Float to long (-195) 1303 us[2606]
Long to float (-193) 2100 us[4201]
Double mul (9) 9152 us[18305]
Double add (19) 5159 us[10319]
Double neg (-19) 3418 us[6837]
Double div (-197) 16720 us[33441]
Double to long (-194) 1618 us[3237]
Long to double (-192) 5305 us[10611]
Source file: bench-float.c