base64 encoding using the new binary syntax

Sean Hinde Sean.Hinde@REDACTED
Mon Sep 25 20:04:33 CEST 2000


> Since the binary syntax is here now, maybe people are interested in
> exploring its performance characteristics. Here's something to start
> the discussion. Performance of the attached module when en(de)coding
> rfc2045.txt (71kb) on my 167MHz ultrasparc:

Running the profiler (using rfc2719 - 48kB) on my laptop has the following

16> eprof:analyse().
FUNCTION                                       CALLS      TIME 

****** Process <0.56.0>    -- 100 % of profiled time *** 
bitbase64:enc/1                                17116      51 % 
bitbase64:acc_pack/2                           901        30 % 
bitbase64:int_to_b64/1                         64862      19 % 
eprof:call/4                                   1          0 % 
bitbase64:pack/1                               1          0 % 

Total time: 1.60
Measurement overhead: 1.06

I think this means that per call:

acc_pack/1 takes 0.179 mS
enc/1 takes 0.016 ms
int_to_b64 takes 0.00158 mS

All acc_pack is doing is splitting a binary and joining another so this does
seem a little excessive...


This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list