Issue #6986: Fix crash in the JSON C accelerator when called with the
[python.git] / Demo / comparisons / README
blob111667c26423a7f637b501921e5f47a4abfc8cb2
1 Subject: Re: What language would you use?
2 From: Tom Christiansen <tchrist@mox.perl.com>
3 Date: 6 Nov 1994 15:14:51 GMT
4 Newsgroups: comp.lang.python,comp.lang.tcl,comp.lang.scheme,comp.lang.misc,comp.lang.perl
5 Message-Id: <39irtb$3t4@csnews.cs.Colorado.EDU>
6 References: <39b7ha$j9v@zeno.nscf.org> <39hhjp$lgn@csnews.cs.Colorado.EDU> <39hvsu$dus@mathserv.mps.ohio-state.edu>
8 [...]
9 If you're really into benchmarks, I'd love it if someone were to code up
10 the following problems in tcl, python, and scheme (and whatever else you'd
11 like).  Separate versions (one optimized for speed, one for beauty :-) are
12 ok.  Post your code so we can time it on our own systems.
14 0)  Factorial Test  (numerics and function calls)
16         (we did this already)
18 1)  Regular Expressions Test
20     Read a file of (extended per egrep) regular expressions (one per line), 
21     and apply those to all files whose names are listed on the command line.
22     Basically, an 'egrep -f' simulator.  Test it with 20 "vt100" patterns
23     against a five /etc/termcap files.  Tests using more elaborate patters
24     would also be interesting.  Your code should not break if given hundreds
25     of regular expressions or binary files to scan.  
27 2)  Sorting Test
29     Sort an input file that consists of lines like this
31         var1=23 other=14 ditto=23 fred=2
33     such that each output line is sorted WRT to the number.  Order
34     of output lines does not change.  Resolve collisions using the
35     variable name.   e.g.
37         fred=2 other=14 ditto=23 var1=23 
39     Lines may be up to several kilobytes in length and contain
40     zillions of variables.
42 3)  System Test
44     Given a list of directories, report any bogus symbolic links contained
45     anywhere in those subtrees.  A bogus symbolic link is one that cannot
46     be resolved because it points to a nonexistent or otherwise
47     unresolvable file.  Do *not* use an external find executable.
48     Directories may be very very deep.  Print a warning immediately if the
49     system you're running on doesn't support symbolic links.
52 I'll post perl solutions if people post the others.
55 --tom
56 -- 
57 Tom Christiansen      Perl Consultant, Gamer, Hiker      tchrist@mox.perl.com
59  "But Billy! A *small* allowance prepares you for a lifetime of small
60  salaries and for your Social Security payments."    --Family Circus