[patch] Make cipher benchmark tests easier to read

Brad Hards bradh at frogmouth.net
Mon Jun 8 03:13:36 CEST 2009


Hi,

Currently the benchmark code lays things out like this
(best viewed in a fixed width font, without wrapping...)
             ECB             CBC             CFB             OFB             CTR             STREAM         
             --------------- --------------- --------------- --------------- --------------- ---------------
3DES            70ms    70ms    70ms    70ms    80ms    70ms    70ms    70ms   110ms   110ms                
CAST5           30ms    30ms    30ms    30ms    30ms    30ms    30ms    30ms    70ms    70ms                
BLOWFISH        20ms    30ms    30ms    30ms    30ms    30ms    20ms    20ms    70ms    70ms                
AES             30ms    30ms    20ms    30ms    20ms    20ms    30ms    30ms    60ms    70ms                
AES192          30ms    40ms    20ms    30ms    30ms    20ms    40ms    30ms    70ms    70ms                
AES256          40ms    40ms    30ms    30ms    30ms    30ms    30ms    40ms    70ms    80ms                
TWOFISH         10ms    20ms    20ms    20ms    20ms    20ms    20ms    20ms    50ms    60ms                
ARCFOUR                                                                                         10ms    10ms
DES             40ms    30ms    40ms    40ms    40ms    30ms    40ms    40ms    80ms    80ms                
TWOFISH128      10ms    20ms    20ms    20ms    20ms    20ms    20ms    20ms    50ms    60ms                
SERPENT128      30ms    20ms    30ms    30ms    30ms    30ms    30ms    30ms    60ms    70ms                
SERPENT192      30ms    20ms    30ms    30ms    30ms    30ms    30ms    30ms    70ms    60ms                
SERPENT256      30ms    30ms    30ms    30ms    30ms    30ms    20ms    40ms    60ms    70ms                
RFC2268_40      30ms    20ms    30ms    20ms    30ms    30ms    30ms    30ms    70ms    70ms                
SEED            30ms    20ms    30ms    30ms    30ms    30ms    20ms    30ms    70ms    60ms                
CAMELLIA128     60ms    50ms    60ms    50ms    60ms    50ms    60ms    60ms    90ms    90ms                
CAMELLIA192     60ms    60ms    60ms    60ms    60ms    60ms    60ms    60ms   100ms    90ms                
CAMELLIA256     60ms    60ms    60ms    60ms    60ms    60ms    60ms    60ms   100ms    90ms

I think that is a bit hard to read - it would be better if
the mode label was centred over the encrypt and decrypt 
time columns, like:
                   ECB             CBC             CFB             OFB             CTR           STREAM     
             --------------- --------------- --------------- --------------- --------------- ---------------
3DES            70ms    70ms    70ms    70ms    70ms    70ms    70ms    70ms   110ms   110ms                
CAST5           30ms    30ms    30ms    30ms    30ms    30ms    30ms    30ms    70ms    70ms                
BLOWFISH        30ms    20ms    30ms    30ms    30ms    30ms    30ms    20ms    70ms    70ms                
AES             30ms    30ms    20ms    30ms    20ms    20ms    30ms    30ms    60ms    70ms                
AES192          30ms    40ms    20ms    40ms    20ms    30ms    30ms    30ms    70ms    70ms                
AES256          40ms    40ms    30ms    30ms    30ms    30ms    40ms    30ms    80ms    70ms                
TWOFISH         20ms    20ms    20ms    20ms    10ms    20ms    20ms    20ms    60ms    50ms                
ARCFOUR                                                                                         20ms    10ms
DES             30ms    40ms    40ms    40ms    40ms    30ms    40ms    40ms    80ms    80ms                
TWOFISH128      20ms    20ms    20ms    20ms    20ms    10ms    20ms    20ms    60ms    60ms                
SERPENT128      20ms    30ms    30ms    30ms    30ms    20ms    30ms    30ms    70ms    70ms                
SERPENT192      30ms    20ms    30ms    30ms    30ms    30ms    30ms    30ms    60ms    70ms                
SERPENT256      30ms    20ms    30ms    30ms    30ms    30ms    30ms    30ms    70ms    60ms                
RFC2268_40      30ms    20ms    30ms    30ms    30ms    20ms    30ms    30ms    70ms    70ms                
SEED            30ms    30ms    30ms    20ms    30ms    30ms    30ms    30ms    60ms    70ms                
CAMELLIA128     50ms    50ms    60ms    60ms    50ms    60ms    50ms    60ms    90ms   100ms                
CAMELLIA192     50ms    60ms    60ms    60ms    60ms    60ms    60ms    60ms   100ms    90ms                
CAMELLIA256     60ms    60ms    60ms    60ms    60ms    60ms    60ms    60ms   100ms    90ms 

Trivial patch is attached. I considered adding some code that
would automatically line it up, but that seemed excessively
complicated for this.

Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: benchmark-prettify-2009-06-08.patch
Type: text/x-diff
Size: 889 bytes
Desc: not available
URL: </pipermail/attachments/20090608/775d7265/attachment-0001.patch>


More information about the Gcrypt-devel mailing list