Roger Burton West <roger-UvLOT2mcgw/NLxjTenLetw@xxxxxxxxxxxxxxxx> writes:
> (Is there a way of counting "operations" or "CPU steps" for a Perl
> program? That would be much more useful than timing for comparisons like
> this.)
What we could do is have some standard perl test program that
exercises a bunch of typical perl behavior, and quote time in terms of
relative times to that. Yes, I'm aware that this conflates
memory/processor speed issues but it'll be something.
For example, if you use the code I posted Aug. 17th as my first
solution to problem 21 as the base*, then my word-finding program
currently does "love" to "hate" in three steps on Web2 (4 words) in
2% of base time.
The longest times are (not surprisingly) the times where there no path
exists, such as "worship" to "justice" which my program concludes in
8% of base time. (Doing "octavo" to "herpes" takes only 7% of base)
We should decide, and I wish MJD had specified explicitly, how we're
handling case because that affects results. (For instance, alcae _is_
on the Web2 list if you're working case-insensitively)
I propose that we all work case-insensitively,(**) and the test for
this is whether a path exists between "ruby" and "code" in Web2. (The
path exists if you're case-insensitive, but not if you're being
case-sensitive)
The reason I propose case-insensitive as the default is that
case-sensitive turns Web2 into a much less interesting list, as far as
this problem is concerned.
(*) Probably not the best choice, as it requires input of Web2 to run,
and needs to have stdout redirected to /dev/null to avoid spewing all
over, and even then is very noisy on STDERR. But it's what I had
available. I welcome a different base proposal. On my machine, base
time is 28.820 seconds.
(**) At least by default. Options that explore alternate behavior are
always good.
|