[erlang-questions] Pointless md5 Problem
Thomas Lindgren
thomasl_erlang@REDACTED
Thu May 7 13:26:39 CEST 2009
----- Original Message ----
> From: Thomas Lindgren <thomasl_erlang@REDACTED>
> Okay, so the code is a terrible 10700 repetitive lines (see below for a taste).
> But a single clause boils down to
>
> %% 0 -> count(Bytes, X000+1, ..., X255);
> {label,5}.
> {gc_bif,'+',{f,0},259,[{x,8},{integer,1}],{x,8}}.
> {move,{x,258},{x,0}}.
> {call_only,257,{f,4}}.
>
> One add, updating one register, then move on to the next list element. Pretty
> close to a byte array, don't you think? Only works as long as you don't do
> anything foolish, of course.
(I should also mention that in spite of the erlang compiler doing a good job in this case, the corresponding C code would still be superior by far.)
Best,
Thomas
More information about the erlang-questions
mailing list