From f445d24606089b3405a7b74754de3c38b8867640 Mon Sep 17 00:00:00 2001 From: Christian Harms Date: Tue, 30 Apr 2019 13:50:08 +0200 Subject: [PATCH 1/2] python base64 module is the same like perl6 module and faster --- base64/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base64/test.py b/base64/test.py index b5d7d6bc..4611d829 100644 --- a/base64/test.py +++ b/base64/test.py @@ -1,4 +1,9 @@ -import base64, time +try: + #pip install pybase64 is required to use the fast base64 variant. + import pybase64 as base64 +except ImportError: + import base64 +import time STR_SIZE = 10000000 TRIES = 100 From 9d4d637190f1ab6bbb999870ab9a3067a2bcb11b Mon Sep 17 00:00:00 2001 From: Christian Harms Date: Tue, 30 Apr 2019 13:54:57 +0200 Subject: [PATCH 2/2] add pybase64 module loading --- base64/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base64/build.sh b/base64/build.sh index 07b44397..d11d6a92 100644 --- a/base64/build.sh +++ b/base64/build.sh @@ -24,3 +24,5 @@ if [ ! -d aklomp-base64-ssse ]; then fi gcc --std=c99 -O3 test-aklomp.c -I aklomp-base64-ssse/include/ aklomp-base64-ssse/lib/libbase64.o -o base64_c_ak_ssse wget -qO - https://cpanmin.us | perl - -L perllib MIME::Base64::Perl +pip install pybase64 +