Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

15 interpreters vs. gawk

16 views
Skip to first unread message

mss

unread,
Feb 21, 2011, 8:42:03 PM2/21/11
to
Just thinking aloud here...

For a project I created here:

<http://www.topcat.hypermart.net/topic.html>

Used several interpreters, & gawk beat them all, with respect
to speed/size, & in some cases, by a couple orders of magnitude
(though sed was close). But admittedly, this was a DSL project
of the sort [g|m]awk excels at. Still, awk is a great language
for me =)

Interpreters (in no particular order) were:

- AWK*
- SED
- Scala
- Rhino
- Clojure
- Common Lisp
- Pike
- Lua
- Perl
- Ruby
- Python
- BCX
- SNOBOL4
- Fortran
- QBASIC
- Chipmunk BASIC

* Thanks for the help pk, Janis & Ed, I appreciate it.

--
later on,
Mike

http://www.topcat.hypermart.net/index.html

addre...@invalid.invalid

unread,
Mar 16, 2011, 5:49:15 PM3/16/11
to
I had a look at the site- no graphs of of runtimes?

Also- care to add the luajit to the list? It's getting good press

T

mss

unread,
Mar 17, 2011, 2:44:03 PM3/17/11
to
<addre...@invalid.invalid> wrote:

> I had a look at the site- no graphs of of runtimes?

Was not a competition, just an observation...
None of the times were 'bad' on the Unix/Linux
side of things. Not near so great under Windows however;
subsystem apps (text mode that is) seem to have only gotten
slower with each new release of Windows.

Here are my informal results using lua 5.1.4/gawk v3.17
under Slackware:

lua invocation: 'time lua topic.lua notes < topic-spec.txt'

lua results:

real 0m0.005s
user 0m0.004s
sys 0m0.000s

gawk invocation: 'time gawk -f topic.awk -v TPC=notes < topic-spec.txt'

gawk results:

real 0m0.003s
user 0m0.000s
sys 0m0.000s

Here, I'm judging the best time by adding the real/user/sys times together.
An aggregate run of 3 times with the tests above is about the same on my end.

> Also- care to add the luajit to the list? It's getting good press

Ahh.. nifty. Well I'll certainly look into it when I can.
Good luck with luajit, seems like an interesting project.

0 new messages