[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: MD5 in Lua
- From: Jean-Claude Wippler <jcw@...>
- Date: Sun, 24 Jun 2001 10:27:42 -0700
On Saturday 23 June 2001 12:43, John Passaniti wrote:
[...]
> 1. Take the C code.
> 2. Write a wrapper in Lua.
> 3. Lua wins!!!
Except that, as the http://www.equi4.com/md5/ page says:
"This is not an attempt to "win" or "prove", but to explore and learn"
The insight I have gained so far, is that Perl/Python/Tcl experts can achieve
performance levels which are in the same league as Forth. This is something
I'd never have considered possible before.
The Python case is most instructive. It shows that the overflow detection
and automatic promotion to unlimited-precision arithmetic give it trouble for
code such as needed in MD5. But as explained in a recently added note, the
VM level of performance is in fact more or less on par with Perl and Tcl.
Of course, there is not that much use for coding up MD5 this way, when just
about every platform has a C version of it.
Still, these results help me understand where scripting can and cannot go.
I repeat: if anyone has a faster version in Lua (or a slower one which avoids
the use of the bitlib library), then I'd be most happy to add it.
-jcw