From: Brion Vibber Date: Sat, 30 Oct 2004 10:20:19 +0000 (+0000) Subject: Work through the NFC substeps with the actual data to make the substep times more... X-Git-Tag: 1.5.0alpha1~1418 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=dafeb1fe3b74b60c675a5e6b0f8f023387562ea4;p=lhc%2Fweb%2Fwiklou.git Work through the NFC substeps with the actual data to make the substep times more meaningful --- diff --git a/includes/normal/UtfNormalBench.php b/includes/normal/UtfNormalBench.php index e81edec27d..444753b8ce 100644 --- a/includes/normal/UtfNormalBench.php +++ b/includes/normal/UtfNormalBench.php @@ -63,11 +63,18 @@ function benchmarkTest( &$u, $filename, $desc ) { 'NFC', # 'NFKC', # 'NFD', 'NFKD', - 'fastDecompose', 'fastCombiningSort', 'fastCompose', + array( 'fastDecompose', 'fastCombiningSort', 'fastCompose' ), 'quickIsNFC', 'quickIsNFCVerify', ); foreach( $forms as $form ) { - benchmarkForm( $u, $data, $form ); + if( is_array( $form ) ) { + $str = $data; + foreach( $form as $step ) { + $str = benchmarkForm( $u, $str, $step ); + } + } else { + benchmarkForm( $u, $data, $form ); + } } } @@ -87,6 +94,7 @@ function benchmarkForm( &$u, &$data, $form ) { $same = (0 == strcmp( $data, $out ) ); printf( " %20s %1.4fs %8d bytes/s (%s)\n", $form, $delta, $rate, ($same ? 'no change' : 'changed' ) ); + return $out; } ?>