benchmark reading of "50xP_sheet1.xlsx"
const path = "test/data/50xP_sheet1.xlsx"; import std.meta : AliasSeq; void use_sheetNamesAndreadSheet() @trusted { foreach (const _, const ref s; Workbook.fromFile(path).sheets) { } } size_t use_bySheet() @trusted { auto file = Workbook.fromFile(path); typeof(return) i = 0; foreach (ref sheet; file.bySheet) { i++; } return i; } alias funs = AliasSeq!(/* use_sheetNamesAndreadSheet, */ use_bySheet); auto results = benchmarkSum!(funs)(runCount); foreach (const i, fun; funs) { writeln(fun.stringof[0 .. $ - 2], "(\"", path, "\") took ", results[i] / runCount); }
Workbook.