Commits

Gora Khargosh committed 9bef865

Adds ipv6 codec speed tests.

Signed-off-by: Gora Khargosh <gora.khargosh@gmail.com>

  • Participants
  • Parent commits 9a0629b

Comments (0)

Files changed (1)

File run_speed_tests.py

     "from mom.codec.base85 import b85encode; import os; b = os.urandom(3079)",
     "from mom.codec.base85 import b85decode, b85encode; import os; b = b85encode(os.urandom(3079))",
     None,
+    "from mom.codec.base85 import ipv6_b85encode; ip = 21932261930451111902915077091070067066",
+    "from mom.codec._alt_base import ipv6_b85encode_naive; ip = 21932261930451111902915077091070067066",
+    "from mom.codec.base85 import ipv6_b85decode; from mom.builtins import b; ip = b('4)+k&C#VzJ4br>0wv%Yp')",
+    "from mom.codec._alt_base import ipv6_b85decode_naive; from mom.builtins import b; ip = b('4)+k&C#VzJ4br>0wv%Yp')",
+    None,
+    "from mom.codec.base85 import rfc1924_b85encode; import os; b = os.urandom(256)",
+    "from mom.codec.base85 import rfc1924_b85decode, rfc1924_b85encode; import os; b = rfc1924_b85encode(os.urandom(256))",
+    "from mom.codec.base85 import rfc1924_b85encode; import os; b = os.urandom(3079)",
+    "from mom.codec.base85 import rfc1924_b85decode, rfc1924_b85encode; import os; b = rfc1924_b85encode(os.urandom(3079))",
+    None,
     "from mom.builtins import integer_byte_length; n=1<<4096",
     "from mom._alt_builtins import integer_byte_length_word_aligned; n=1<<4096",
     "from mom._alt_builtins import integer_byte_length_shift_counting; n=1<<4096",
     "b85encode(b)",
     "b85decode(b)",
     None,
+    "ipv6_b85encode(ip)",
+    "ipv6_b85encode_naive(ip)",
+    "ipv6_b85decode(ip)",
+    "ipv6_b85decode_naive(ip)",
+    None,
+    "rfc1924_b85encode(b)",
+    "rfc1924_b85decode(b)",
+    "rfc1924_b85encode(b)",
+    "rfc1924_b85decode(b)",
+    None,
     "integer_byte_length(n)",
     "integer_byte_length_word_aligned(n)",
     "integer_byte_length_shift_counting(n)",