Code cleanup

master
Inga 🏳‍🌈 7 years ago
parent b04d5688ed
commit e54450c4b6
  1. 2
      README.md
  2. 20
      dotnet/WhiteRabbit.UnmanagedBridge/md5.cpp

@ -47,7 +47,7 @@ Number of words|Time to check all anagrams no longer than that|Time to solve "ea
---------------|----------------------------------------------|-------------------------|-----------------------------------|-------------------------|---------------------------------------------
3|0.04s||||4560
4|0.45s|||0.08s|7,431,984
5|9.6s|0.15s|0.06s|0.29s|1,347,437,484
5|9.6s|0.15s|0.06s|0.27s|1,347,437,484
6|4.5 minutes|0.85s|0.17s|2.05s|58,405,904,844
7|83 minutes|4.7s|0.6s|13.3s|1,070,307,744,114
8|14 hours|17.6s|1.8s|55s|10,893,594,396,594

@ -78,24 +78,8 @@ __forceinline const MD5Vector CREATE_VECTOR(const int a) { return MD5Vector(_mm2
__forceinline const MD5Vector CREATE_VECTOR_FROM_INPUT(const unsigned __int32* input, const size_t offset)
{
return MD5Vector(
_mm256_set_epi32(
input[offset + 7 * 8],
input[offset + 6 * 8],
input[offset + 5 * 8],
input[offset + 4 * 8],
input[offset + 3 * 8],
input[offset + 2 * 8],
input[offset + 1 * 8],
input[offset + 0 * 8]),
_mm256_set_epi32(
input[offset + 15 * 8],
input[offset + 14 * 8],
input[offset + 13 * 8],
input[offset + 12 * 8],
input[offset + 11 * 8],
input[offset + 10 * 8],
input[offset + 9 * 8],
input[offset + 8 * 8]));
_mm256_i32gather_epi32((int*)(input + offset), _mm256_set_epi32(7 * 8, 6 * 8, 5 * 8, 4 * 8, 3 * 8, 2 * 8, 1 * 8, 0 * 8), 4),
_mm256_i32gather_epi32((int*)(input + offset), _mm256_set_epi32(15 * 8, 14 * 8, 13 * 8, 12 * 8, 11 * 8, 10 * 8, 9 * 8, 8 * 8), 4));
}
#define WRITE_TO_OUTPUT(a, output, expected) \

Loading…
Cancel
Save