Warning: Division by zero in /var/customers/webs/stc/benchmark/index.php on line 256 Test: float vs. integer multiplication

PHP Benchmarks

Performance comparison of PHP code alternatives.

Test: float vs. integer multiplication

Run Again Test Menu

Result

Unfortunately, no history for this test is available.

Code

The first test, "float", was:

$GLOBALS['dummy'] = 0.0;
for ($j = 0; $j < 100; $j++)
	$GLOBALS['dummy'] *= $GLOBALS['dummy_float'];

The second test, "integer", was:

$GLOBALS['dummy'] = 0;
for ($j = 0; $j < 100; $j++)
	$GLOBALS['dummy'] *= $GLOBALS['dummy_int'];

Running: Linux (x86_64:1 GB) PHP (7.2.22-1+ubuntu16.04.1+deb.sury.org+1)