dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C popcount hamdist
C cycles/limb cycles/limb
C AMD K8,K9 67
C AMD K10 67
C Intel P4 1214.3
C Intel core2 78
C Intel corei ? 7.3
C Intel atom 16.517.5
C VIA nano 8.7510.4
C TODO
C * Tune. It should be possible to reach 5 c/l for popcount and6 c/l for
C hamdist for K8/K9.
mov %r8, %r9 mov %rbx, %rbp shr %r8 shr %rbx and h55555555, %r8 and h55555555, %rbx sub %r8, %r9 sub %rbx, %rbp
mov %r9, %r8 mov %rbp, %rbx shr $2, %r9 shr $2, %rbp and h33333333, %r8 and h33333333, %r9 and h33333333, %rbx and h33333333, %rbp add %r8, %r9 C 164-bit fields (0..4) add %rbx, %rbp C 164-bit fields (0..4)
add %rbp, %r9 C 164-bit fields (0..8)
L(mid): mov %r9, %r8 shr $4, %r9 and h0f0f0f0f, %r8 and h0f0f0f0f, %r9 add %r8, %r9 C 88-bit fields (0..16)
imul h01010101, %r9 C sum the 8 fields in high 8 bits shr $56, %r9
add %r9, %rax C add to total add $2, n
jnc L(top)
L(end):
HAM(` pop %r12 ') pop %rbp pop %rbx
FUNC_EXIT() ret
EPILOGUE()
Messung V0.5 in Prozent
[0.7Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.Projekt 2026-06-10]