Article View: comp.lang.misc
Article #3113Re: Dynamic typing (part 3)
From: Steve Knight
Date: Thu, 21 Mar 1991 16:00
Date: Thu, 21 Mar 1991 16:00
20 lines
1210 bytes
1210 bytes
Chris writes:
> Dan certainly gets better efficiency: -oneof- is slow on lists (because
> -length- and indexing are slow on lists). Given Steve's propensity for
> speed-hacking, I'm surprised he didn't write the definition of -syllables- as
> lvars syllables = {% 'syllables'.discin.incharline.pdtolist.dl %};
> to generate a vector rather than a list.
No fair, Chris :-) It was only an anecdote ... Still if you insist[*].
define pdtovector( p ); lvars p; {% apprepeater( p, identfn ) %} enddefine;
Footnote:
Besides, you know I'd have written it like this for speed
define program();
lvars n = #| apprepeater( '/tmp/syllables'.discinline, identfn ) |#;
repeat 3 times
n.random.subscr_stack.pr
endrepeat;
nl( 1 );
enddefine;
Technical Details
Message-ID:
<2400037@otter.hpl.hp.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!sfkReferences:
<602@optima.cs.arizona.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!sfk From: sfk@otter.hpl.hp.com (Steve Knight) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing (part 3) Message-ID: <2400037@otter.hpl.hp.com> Date: 21 Mar 91 16:00:24 GMT References: <602@optima.cs.arizona.edu> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 20