Various optimizations, Readme update, Bench script for imports

This commit is contained in:
2023-06-22 14:36:44 +02:00
parent f71748838f
commit 1ac619f3a0
9 changed files with 155 additions and 26 deletions

28
examples/import_bench.jl Normal file
View File

@@ -0,0 +1,28 @@
using metagraph_optimization
using BenchmarkTools
using Base
using Base.Filesystem
function bench_txt(filepath::String)
name = basename(filepath)
name, _ = splitext(name)
println(name, ":")
g = import_txt(filepath)
print(g)
println(" Graph size in memory: ", bytes_to_human_readable(Base.summarysize(g)))
@btime import_txt($filepath)
println()
end
function main()
bench_txt("examples/AB->AB.txt")
bench_txt("examples/AB->ABBB.txt")
bench_txt("examples/AB->ABBBBB.txt")
bench_txt("examples/AB->ABBBBBBB.txt")
#bench_txt("examples/AB->ABBBBBBBBB.txt")
bench_txt("examples/ABAB->ABAB.txt")
bench_txt("examples/ABAB->ABC.txt")
end
main()