{"action":"created","issue":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/395","repository_url":"https://api.github.com/repos/jedisct1/libsodium","labels_url":"https://api.github.com/repos/jedisct1/libsodium/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/jedisct1/libsodium/issues/395/comments","events_url":"https://api.github.com/repos/jedisct1/libsodium/issues/395/events","html_url":"https://github.com/jedisct1/libsodium/issues/395","id":155078028,"number":395,"title":"unexpected blake2b performance","user":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-16T17:26:49Z","updated_at":"2016-05-16T20:46:12Z","closed_at":null,"body":"Using pysodium, I am seeing less than expected speed:\r\n```\r\nspeedup sha256 -> sha512: 1.4616587679833115\r\nspeedup sha256 -> blake2b: 1.5823430737200959\r\nspeedup sha512 -> blake2b: 1.0825666758755845  <-- should be ~3\r\n```\r\nThe numbers come from just hashing a big amount of data with python3.5 stdlib sha256/512 and pysodium crypto_generichash - cpu is a i5-4200u, linux 64bit, source code:\r\n\r\n[hash_speed.py.txt](https://github.com/jedisct1/libsodium/files/266605/hash_speed.py.txt)\r\n\r\nI first thought this is maybe caused by a slow blake2b in libsodium 1.0.8 in ubuntu and I manually compiled / installed libsodium 1.0.10 - but it doesn't get faster.\r\n\r\n```\r\n$ ldconfig -p|grep sodium\r\n\tlibsodium.so.18 (libc6,x86-64) => /usr/local/lib/libsodium.so.18\r\n\tlibsodium.so.18 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libsodium.so.18\r\n\tlibsodium.so (libc6,x86-64) => /usr/local/lib/libsodium.so\r\n```\r\n\r\nhttps://blake2.net/ says blake2b should be about 3x faster than sha512 (and I read about the \"record setting blake2b\" in libsodium >= 1.0.9), so what's going wrong here?\r\n"},"comment":{"url":"https://api.github.com/repos/jedisct1/libsodium/issues/comments/219542511","html_url":"https://github.com/jedisct1/libsodium/issues/395#issuecomment-219542511","issue_url":"https://api.github.com/repos/jedisct1/libsodium/issues/395","id":219542511,"user":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T20:46:12Z","updated_at":"2016-05-16T20:46:12Z","body":"```\r\n7fdafbbf\r\n10000000\r\n8000000\r\n```"}}