xvfs-test-phf at [b502b175ea]

File xvfs-test-phf artifact c605598e4e part of check-in b502b175ea


#! /usr/bin/env tclsh

set sourceDirectory [file dirname [file normalize [info script]]]

lappend auto_path [file join $sourceDirectory lib]

package require xvfs

set list {
	main.tcl foo fop gop top fooo lib/hello/hello.tcl lib/hello/pkgIndex.tcl lib/hello lib {}
}

for {set i 0} {$i < 2000} {incr i} {
	lappend list $i
}

for {set idx 0} {$idx < [llength $list]} {incr idx} {
	set subList [lrange $list 0 $idx]
	puts "$idx ($subList):"
	puts [time {
		puts [::xvfs::generatePerfectHashFunctionCall pathName strlen(pathName) -1 $subList useCacheFirst true]
	} 1]
	puts ""
}