Experiments
This commit is contained in:
@@ -53,14 +53,14 @@ function Get-Mode($Values) {
|
||||
# Every implementation must produce the same observable result for an
|
||||
# identical trace. A mismatch invalidates the performance run.
|
||||
$mismatches = @($rows |
|
||||
Group-Object profile,type,workload,n,repeat,seed |
|
||||
Group-Object profile,type,workload,n,operations,repeat,seed |
|
||||
Where-Object { @($_.Group.checksum | Select-Object -Unique).Count -ne 1 })
|
||||
if ($mismatches.Count -ne 0) {
|
||||
throw "Checksum mismatch in $($mismatches.Count) benchmark cell(s)"
|
||||
}
|
||||
|
||||
$medians = @($rows |
|
||||
Group-Object profile,type,structure,workload,n,leaf,fanout,levels |
|
||||
Group-Object profile,type,structure,workload,n,operations,leaf,fanout,levels |
|
||||
ForEach-Object {
|
||||
$group = $_.Group
|
||||
$candidate = $group[0].structure
|
||||
@@ -73,6 +73,7 @@ $medians = @($rows |
|
||||
structure = $candidate
|
||||
workload = $group[0].workload
|
||||
n = [uint64]$group[0].n
|
||||
operations = [uint64]$group[0].operations
|
||||
leaf = [uint64]$group[0].leaf
|
||||
fanout = [uint64]$group[0].fanout
|
||||
levels = [uint64]$group[0].levels
|
||||
@@ -80,6 +81,8 @@ $medians = @($rows |
|
||||
final_fanout = Get-Mode @($group.final_fanout)
|
||||
final_levels = Get-Mode @($group.final_levels)
|
||||
final_mode = Get-Mode @($group.final_mode)
|
||||
median_construction_ns = Get-Median @($group.construction_ns | ForEach-Object { [double]$_ })
|
||||
median_initial_bytes = Get-Median @($group.initial_bytes | ForEach-Object { [double]$_ })
|
||||
median_ns = Get-Median @($group.total_ns | ForEach-Object { [double]$_ })
|
||||
median_ns_per_op = Get-Median @($group.ns_per_op | ForEach-Object { [double]$_ })
|
||||
median_bytes = Get-Median @($group.allocated_bytes | ForEach-Object { [double]$_ })
|
||||
@@ -103,24 +106,24 @@ $medians = @($rows |
|
||||
}
|
||||
})
|
||||
|
||||
$medians | Sort-Object profile,type,workload,n,structure |
|
||||
$medians | Sort-Object profile,type,workload,n,operations,structure |
|
||||
Export-Csv -LiteralPath $CellMedianFile -NoTypeInformation -Encoding utf8
|
||||
|
||||
$fixedNames = @('std::vector_reserved', 'std::deque',
|
||||
'std::list_index_semantics')
|
||||
$bestFixed = @{}
|
||||
$medians | Group-Object profile,type,workload,n | ForEach-Object {
|
||||
$medians | Group-Object profile,type,workload,n,operations | ForEach-Object {
|
||||
$eligible = @($_.Group | Where-Object {
|
||||
$fixedNames -contains $_.structure -or $_.structure -like 'tiered_forced_leaf_*'
|
||||
})
|
||||
if ($eligible.Count -gt 0) {
|
||||
$key = "$($_.Group[0].profile)|$($_.Group[0].type)|$($_.Group[0].workload)|$($_.Group[0].n)"
|
||||
$key = "$($_.Group[0].profile)|$($_.Group[0].type)|$($_.Group[0].workload)|$($_.Group[0].n)|$($_.Group[0].operations)"
|
||||
$bestFixed[$key] = ($eligible.median_ns | Measure-Object -Minimum).Minimum
|
||||
}
|
||||
}
|
||||
|
||||
$cellScores = @($medians | ForEach-Object {
|
||||
$key = "$($_.profile)|$($_.type)|$($_.workload)|$($_.n)"
|
||||
$key = "$($_.profile)|$($_.type)|$($_.workload)|$($_.n)|$($_.operations)"
|
||||
if ($bestFixed.ContainsKey($key) -and $_.median_ns -gt 0) {
|
||||
[pscustomobject]@{
|
||||
profile = $_.profile
|
||||
@@ -128,6 +131,7 @@ $cellScores = @($medians | ForEach-Object {
|
||||
type = $_.type
|
||||
workload = $_.workload
|
||||
n = $_.n
|
||||
operations = $_.operations
|
||||
score = [double]$bestFixed[$key] / [double]$_.median_ns
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user