Skip to content

Instantly share code, notes, and snippets.

@TerryE
TerryE / op_counts.php
Last active December 22, 2015 14:29
Simple RDTSC-based instrumentation of PHP 5.5.3
<?php
/*
* Simple parser of op_counts file. Output is desgined to be pasted / imported into spreadsheet
* for further analysis.
*/
define('PHP_SOURCE_DIR', '~/work/php55'); /* replace as required */
define('OP_COUNT', 164*25); /* as at PHP 5.5 */
define('OP_COUNT_EXTRAS', 5);
$total_count = array_fill(0, OP_COUNT + OP_COUNT_EXTRAS, 0);
$total_cycles = array_fill(0, OP_COUNT + OP_COUNT_EXTRAS, 0);