local res = ffi.C.base64_test(true, 1000000, 1024)
local t2 = ffi.C.rspamd_get_ticks()
- print("Refrence base64 (1K): " .. tostring(t2 - t1) .. " sec")
+ print("Reference base64 (1K): " .. tostring(t2 - t1) .. " sec")
assert_not_equal(res, 0)
end)
test("Base64 test optimized vectors 1K", function()
local res = ffi.C.base64_test(true, 1000000, 512)
local t2 = ffi.C.rspamd_get_ticks()
- print("Refrence base64 (512): " .. tostring(t2 - t1) .. " sec")
+ print("Reference base64 (512): " .. tostring(t2 - t1) .. " sec")
assert_not_equal(res, 0)
end)
test("Base64 test optimized vectors 512", function()
local res = ffi.C.base64_test(true, 100000, 10240)
local t2 = ffi.C.rspamd_get_ticks()
- print("Refrence base64 (10K): " .. tostring(t2 - t1) .. " sec")
+ print("Reference base64 (10K): " .. tostring(t2 - t1) .. " sec")
assert_not_equal(res, 0)
end)
test("Base64 test optimized vectors 10K", function()
local res = ffi.C.siphash24_test(true, 100000, 1024)
local t2 = ffi.C.rspamd_get_ticks()
- print("Refrence siphash (1KB): " .. tostring(t2 - t1) .. " sec")
+ print("Reference siphash (1KB): " .. tostring(t2 - t1) .. " sec")
assert_not_equal(res, 0)
end)
test("Siphash test optimized vectors (1KB)", function()
local res = ffi.C.siphash24_test(true, 1000000, 5)
local t2 = ffi.C.rspamd_get_ticks()
- print("Refrence siphash (5B): " .. tostring(t2 - t1) .. " sec")
+ print("Reference siphash (5B): " .. tostring(t2 - t1) .. " sec")
assert_not_equal(res, 0)
end)
test("Siphash test optimized vectors (5B)", function()
local res = ffi.C.siphash24_test(true, 1000000, 50)
local t2 = ffi.C.rspamd_get_ticks()
- print("Refrence siphash (50B): " .. tostring(t2 - t1) .. " sec")
+ print("Reference siphash (50B): " .. tostring(t2 - t1) .. " sec")
assert_not_equal(res, 0)
end)
test("Siphash test optimized vectors (50B)", function()