bug#79006: hash of f32vectors is constant
theophile.brezot--- via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <[email protected]> Sat, 12 Jul 2025 18:01:24 +0000
| Newsgroups | gmane.lisp.guile.bugs |
|---|---|
| Message-ID | <RpzObsXsIfRqT_2pxCQoIuEqlO-xyJfrdm_l6y5v-8FwpxDbvC-P0uYa5V-LdWLhbc-eP9a5_mJUxbPfe1rLG7MTnjUJXAZ9-kF8lBGPwyE=@protonmail.com> |
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------f1b65618cfc95b1d4a42557dec7e55ab24d682b7fbb83d5f66e0a08110c46fec
Content-Type: multipart/mixed;boundary=---------------------25a9bae381c23427631a54ac344c9bdf
-----------------------25a9bae381c23427631a54ac344c9bdf
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;charset=utf-8
Hello,
Hashing two different f32vectors returns the same value:
```
(equal? (hash (f32vector 1) most-positive-fixnum)
(hash (f32vector 2) most-positive-fixnum))
; =3D> #t
```
This is wrong since these vectors are not equal?:
```
(equal? (f32vector 1)
(f32vector 2))
; =3D> #f
```
This has been tester on Guile v3.0.10-1.402e0df (guile-next install
using Guix) and on Guile v3.0.9 (guile install using Guix) on a Debian
Linux.
The same behavior can be observed using f64vectors.
This is in my opinion quite a serious bug since it degrades performance
of hash tables to linear time (measuring my program performances led me
to it) making them unusable (at least not directly usable) for such
types.
Best regards and thanks for your work,
--
Th=C3=A9ophile BR=C3=89ZOT
-----------------------25a9bae381c23427631a54ac344c9bdf--
--------f1b65618cfc95b1d4a42557dec7e55ab24d682b7fbb83d5f66e0a08110c46fec
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsC5BAEBCgBtBYJocqLoCZAG6vE9O+hvdUUUAAAAAAAcACBzYWx0QG5vdGF0
aW9ucy5vcGVucGdwanMub3Jn1WUhZz92dUW/m80rmsb6s7Y1zWkrdJkvlbGB
QIywk1oWIQRmQ/mkmMVj+CC/efkG6vE9O+hvdQAAU5QH/ArE4BE/JXzoRucb
2RIK6OE0lt41x1AeUDNXUd1PhVOX3P0+2Eyb7p70B70KpWbHM6IFHGTMJm7Q
hDL3ZVUizTBf2CENIz+H/I4+WyTYcZ6N2Oxu3nrWglwjjwhDQADbhM5nEB6l
FiF3C8vwqgIyGQLo9mYNzxWHpM7Pm1BK/pb87ZXxqARM5JDxzZ6rTQzF8VKT
EgE/BAZDwvMR2BAzn8daAJY+Nw3r8pajSYJ8vplvLKtiuWejc7Fg7/XAuwVU
rbM63SjaXhv4OjH9zHjSqaM6CqVj29gpdahKrjdsLPcKEBlMaPdcQ2ESdrRt
HQ9VIKjRjsmQtlppmuk2K/HK5oY=
=kDnR
-----END PGP SIGNATURE-----
--------f1b65618cfc95b1d4a42557dec7e55ab24d682b7fbb83d5f66e0a08110c46fec--