Re: [TCLCORE] Tcl-Core Digest, Vol 23, Issue 35
by Twylite other posts by this author
Apr 29 2008 2:33PM messages near this date
Re: [TCLCORE] Installation changes for Tcl 8.6
|
Re: [TCLCORE] Tcl-Core Digest, Vol 23, Issue 35
>
> From: "Alexandre Ferrieux" <alexandre.ferrieux@[...].com>
> Subject: Re: [TCLCORE] [SPAM] [6.0] Re: base64 in the core?
>
> Now this part is clarified, may I ask about the strength of the motivation ?
> Are there compelling examples of a need for [string foreach] except
> for toy Huffmann encoders, toy base64-again, or even toy-parsers ?
> Greased lightning for toys ?
>
> -Alex
>
Why toy? I understand your suggestion that all of these examples are
"toys" to mean that you would consider a Tcl implementation of any of
this functionality to be a "toy", further implying that a "real"
implementation would be in C as an extension.
What about those of us that use Tcl as a fully functional language and
don't intend to drop to C every time we need to do something that
vaguely resembles byte- or number-crunching in a reasonable period of time?
For example many of the crypto primitives implemented in pure Tcl are
around two orders of magnitude slower than a C equivalent, making them
unusable in many applications. To sign a mail with 1Mb attachment in
pure Tcl takes 16s for the SHA1 alone. Improving that by one order of
magnitude - which a function like "string foreach" may be able to do -
would make SHA1 usable for real-world applications. Bignum support has
already brought pure-Tcl RSA performance to around 50% that of C (basic
square-and-multiply algorithm) showing that a bit of framework support
can make all the difference.
I like Donal's suggestion of a scripted mock-up - I've already started
looking at it and noticed that some algorithms favour a character
representation for the iteration variable while others favour an int -
an immediate API complication.
Regards,
Trevor
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Twylite
Alexandre Ferrieux
|