Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #32659 > unrolled thread

Intel's Skylake Prime Number Bug.

Started by"Skybuck Flying" <skybuck2000@hotmail.com>
First post2016-01-11 16:44 +0100
Last post2016-01-11 23:46 -0800
Articles 20 on this page of 192 — 45 participants

Back to article view | Back to comp.arch


Contents

  Intel's Skylake Prime Number Bug. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-11 16:44 +0100
    Re: Intel's Skylake Prime Number Bug. Larc <larc@notmyaddress.com> - 2016-01-11 11:10 -0500
      Re: Intel's Skylake Prime Number Bug. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-11 10:16 -0800
        Re: Intel's Skylake Prime Number Bug. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-11 21:44 +0100
          Re: Intel's Skylake Prime Number Bug. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-11 13:06 -0800
            Re: Intel's Skylake Prime Number Bug. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-12 16:35 +0100
              Re: Intel's Skylake Prime Number Bug. DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2016-01-12 12:53 -0500
                Re: Intel's Skylake Prime Number Bug. Mark - <nonemail@spamspamapam.net> - 2016-01-12 20:00 +0000
                  Re: Intel's Skylake Prime Number Bug. Larc <larc@notmyaddress.com> - 2016-01-12 16:54 -0500
                    Re: Intel's Skylake Prime Number Bug. Mark - <nonemail@spamspamapam.net> - 2016-01-12 22:14 +0000
              Re: Intel's Skylake Prime Number Bug. "wolfgang kern" <nowhere@never.at> - 2016-01-12 19:53 +0100
          Re: Intel's Skylake Prime Number Bug. Paul <nospam@needed.com> - 2016-01-11 16:55 -0500
            Re: Intel's Skylake Prime Number Bug. B00ze <B00ze64@hotmail.com> - 2016-01-11 23:48 -0500
      Re: Intel's Skylake Prime Number Bug. John Larkin <jjlarkin@highlandtechnology.com> - 2016-01-11 10:22 -0800
        Re: Intel's Skylake Prime Number Bug. Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 13:42 -0500
          Re: Intel's Skylake Prime Number Bug. John Larkin <jjlarkin@highlandtechnology.com> - 2016-01-11 11:12 -0800
            Re: Intel's Skylake Prime Number Bug. David Brown <david.brown@hesbynett.no> - 2016-01-12 11:06 +0100
              Re: Intel's Skylake Prime Number Bug. Richard Heathfield <rjh@cpax.org.uk> - 2016-01-12 10:21 +0000
                Re: Intel's Skylake Prime Number Bug. David Brown <david.brown@hesbynett.no> - 2016-01-12 11:42 +0100
              t cluttered John Larkin <jjlarkin@highlandtechnology.com> - 2016-01-12 09:25 -0800
                Re: t cluttered David Brown <david.brown@hesbynett.no> - 2016-01-12 22:05 +0100
                  Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-12 14:03 -0800
                    Re: t cluttered Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-01-12 21:44 -0800
                      Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-13 15:41 +0800
                        Re: t cluttered krw <krw@nowhere.com> - 2016-01-13 21:39 -0500
                    Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-13 00:52 -0800
                      Re: t cluttered already5chosen@yahoo.com - 2016-01-13 02:39 -0800
                  Re: t cluttered Rick Jones <rick.jones2@hpe.com> - 2016-01-12 22:41 +0000
                    Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-12 23:01 +0000
                      Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-12 16:16 -0800
                        Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-13 10:35 +0000
                          Re: t cluttered Anonymous <no_email@invalid.invalid> - 2016-01-13 14:36 +0000
                            Re: t cluttered Robert Wessel <robertwessel2@yahoo.com> - 2016-01-14 02:48 -0600
                              Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 10:50 +0000
                                Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 05:25 -0800
                                  Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 07:23 -0800
                                    Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-14 09:17 -0700
                                      Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 16:30 +0000
                                        Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 12:02 -0800
                                          Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 21:22 +0000
                                          Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 10:06 +0800
                                        Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 09:48 +0800
                                      Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 11:57 -0800
                                        Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-14 19:16 -0700
                                    Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 08:29 -0800
                                      Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 12:13 -0800
                                        Re: t cluttered Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-01-14 12:24 -0800
                                          Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 12:48 -0800
                                            Re: t cluttered Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-01-14 13:06 -0800
                                            Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 10:14 +0800
                                        Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-15 14:33 +0000
                                          Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 09:39 +0000
                                            Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-17 00:15 +0800
                                              Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 19:24 +0000
                                              Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-16 12:18 -0800
                                                Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-17 17:46 +0800
                                                  Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-17 02:53 -0800
                                              Re: t cluttered Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-18 12:20 -0500
                                                Re: t cluttered paul wallich <pw@panix.com> - 2016-01-18 14:42 -0500
                                                Re: t cluttered Erik Trulsson <erikt@Update.UU.SE> - 2016-01-19 13:05 +0000
                                                  Re: t cluttered paul wallich <pw@panix.com> - 2016-01-19 08:29 -0500
                                                  Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 13:48 +0000
                                                  Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-19 17:04 +0000
                                                    Re: t cluttered already5chosen@yahoo.com - 2016-01-19 10:27 -0800
                                                      Re: t cluttered David Brown <david.brown@hesbynett.no> - 2016-01-20 11:30 +0100
                                                        Re: t cluttered already5chosen@yahoo.com - 2016-01-20 03:55 -0800
                                                          Re: t cluttered David Brown <david.brown@hesbynett.no> - 2016-01-20 15:17 +0100
                                                            Re: t cluttered already5chosen@yahoo.com - 2016-01-20 07:15 -0800
                                                      Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-20 16:17 +0000
                                                  Re: t cluttered EricP <ThatWouldBeTelling@thevillage.com> - 2016-01-19 15:37 -0500
                                            Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-16 16:46 +0000
                                              Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-16 10:10 -0800
                                              Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-16 10:11 -0800
                                                Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 19:42 +0000
                                                  Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-17 17:51 +0000
                                              Re: t cluttered rpw3@rpw3.org (Rob Warnock) - 2016-01-17 08:21 +0000
                                                Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-17 17:41 +0000
                                                  Re: t cluttered Melzzzzz <mel@zzzzz.com> - 2016-01-17 20:03 +0100
                                                  Re: t cluttered rpw3@rpw3.org (Rob Warnock) - 2016-01-18 12:13 +0000
                                                    Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-18 14:24 +0000
                                                    Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-18 14:40 +0000
                                          Re: t cluttered Megol <golem960@gmail.com> - 2016-01-16 06:25 -0800
                                            Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 15:09 +0000
                                              Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-17 00:21 +0800
                                            Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-16 16:34 +0000
                                    Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 08:33 -0800
                                    Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 09:38 +0800
                                    Re: t cluttered jgk@panix.com (Joe keane) - 2016-01-17 19:25 +0000
                                      Re: t cluttered already5chosen@yahoo.com - 2016-01-17 11:38 -0800
                                      Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-17 14:21 -0800
                                        Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-17 23:21 +0000
                                  Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 16:29 +0000
                                    Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 08:39 -0800
                                      Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 16:45 +0000
                                        Re: t cluttered already5chosen@yahoo.com - 2016-01-14 11:35 -0800
                                          Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 21:32 +0000
                                            Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-14 15:08 -0800
                                              Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 20:21 -0800
                                            Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 20:20 -0800
                                    Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-14 16:48 +0000
                                      Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 18:05 +0000
                                        Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-15 10:17 +0000
                          Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-13 11:54 -0800
                            Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-13 20:41 +0000
                              Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-13 17:57 -0800
                            Re: t cluttered mrs@kithrup.com (Mike Stump) - 2016-01-18 13:37 +0000
                              Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 00:06 +0800
                              Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-18 15:27 -0800
                                Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 09:43 +0000
                                  Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 18:00 +0800
                                    Re: t cluttered already5chosen@yahoo.com - 2016-01-19 02:47 -0800
                                      Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-19 03:01 -0800
                                        Re: t cluttered already5chosen@yahoo.com - 2016-01-19 04:43 -0800
                                        Re: t cluttered jgk@panix.com (Joe keane) - 2016-01-21 17:35 +0000
                                          Re: t cluttered Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-21 14:45 -0500
                                            Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 09:49 +0000
                                              Re: hashes and b-trees, was't cluttered John Levine <johnl@iecc.com> - 2016-01-22 16:53 +0000
                                                Re: hashes and b-trees, was't cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-22 10:34 -0700
                                                  Re: hashes and b-trees, was't cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 18:00 +0000
                                              Re: t cluttered Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-25 14:03 -0500
                                                Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-25 19:57 +0000
                                                  Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-26 00:17 -0800
                                                    Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-26 10:00 +0000
                                            Re: t cluttered jgk@panix.com (Joe keane) - 2016-01-23 18:59 +0000
                                      Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 19:28 +0700
                                        Re: t cluttered already5chosen@yahoo.com - 2016-01-19 15:41 -0800
                                          Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-20 15:20 +0100
                                    Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 11:25 +0000
                                      Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 19:48 +0700
                                        Re: t cluttered Walter Banks <walter@bytecraft.com> - 2016-01-19 09:54 -0500
                                          Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 16:49 +0000
                                    Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-19 17:25 -0800
                                      Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-19 17:43 -0800
                                      Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-20 14:52 +0100
                                  Re: t cluttered already5chosen@yahoo.com - 2016-01-19 02:14 -0800
                                    Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-19 02:33 -0800
                                      Re: t cluttered already5chosen@yahoo.com - 2016-01-19 02:57 -0800
                                    Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 11:34 +0000
                                      Re: t cluttered already5chosen@yahoo.com - 2016-01-19 05:24 -0800
                                        Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-19 15:46 -0700
                                          Re: t cluttered already5chosen@yahoo.com - 2016-01-19 16:14 -0800
                                            Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-19 18:37 -0700
                                              Re: t cluttered already5chosen@yahoo.com - 2016-01-20 03:32 -0800
                                                Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 11:04 -0700
                                          Re: t cluttered Melzzzzz <mel@zzzzz.com> - 2016-01-20 06:56 +0100
                                            Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 00:55 -0700
                                              Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 01:27 -0700
                                              Re: t cluttered Melzzzzz <mel@zzzzz.com> - 2016-01-20 13:55 +0100
                                          Re: t cluttered already5chosen@yahoo.com - 2016-01-20 08:50 -0800
                                            Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 11:34 -0700
                                              Re: t cluttered already5chosen@yahoo.com - 2016-01-20 11:13 -0800
                                                Re: t cluttered already5chosen@yahoo.com - 2016-01-20 15:15 -0800
                                                  Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 17:29 -0700
                                                    Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-21 08:42 +0100
                                                      Re: t cluttered already5chosen@yahoo.com - 2016-01-21 03:15 -0800
                                                        Re: t cluttered already5chosen@yahoo.com - 2016-01-21 05:03 -0800
                                                        Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-21 06:42 -0800
                                                          Re: t cluttered already5chosen@yahoo.com - 2016-01-21 07:45 -0800
                                                            Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-21 21:30 +0100
                                                            Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-21 16:17 -0800
                                                              Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-22 07:57 +0100
                                                                Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 13:18 +0000
                                                                  Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-22 14:51 +0100
                                                                    Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 14:14 +0000
                                                                Re: t cluttered already5chosen@yahoo.com - 2016-01-22 05:52 -0800
                                                                  Re: t cluttered already5chosen@yahoo.com - 2016-01-22 06:33 -0800
                                                                  Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-22 10:48 -0700
                                                                    Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-22 19:30 +0100
                                                    Re: t cluttered already5chosen@yahoo.com - 2016-01-21 02:18 -0800
                                    Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 19:10 +0700
                                Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-19 06:35 -0800
                                  Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-19 10:49 -0800
                  Re: t cluttered krw <krw@nowhere.com> - 2016-01-12 20:53 -0500
                    Re: t cluttered Dennis <dennis@none.none> - 2016-01-13 14:56 -0600
                      Re: t cluttered krw <krw@nowhere.com> - 2016-01-13 21:43 -0500
                  Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-13 13:24 +0800
                Re: t cluttered upsidedown@downunder.com - 2016-01-13 10:15 +0200
          Re: Intel's Skylake Prime Number Bug. JJ <jj4public@vfemail.net> - 2016-01-12 13:11 +0700
          Re: Intel's Skylake Prime Number Bug. "Tom Del Rosso" <fizzbintuesday@that-google-mail-domain.com> - 2016-01-12 02:45 -0500
            Re: Intel's Skylake Prime Number Bug. Paul <nospam@needed.com> - 2016-01-12 04:38 -0500
            Re: Intel's Skylake Prime Number Bug. MitchAlsup <MitchAlsup@aol.com> - 2016-01-12 06:33 -0800
            Re: Intel's Skylake Prime Number Bug. krw <krw@nowhere.com> - 2016-01-12 12:35 -0500
        Re: Intel's Skylake Prime Number Bug. EricP <ThatWouldBeTelling@thevillage.com> - 2016-01-11 14:33 -0500
          Re: Intel's Skylake Prime Number Bug. Casper H.S. Dik <Casper.Dik@OrSPaMcle.COM> - 2016-01-12 17:27 +0000
        Re: Intel's Skylake Prime Number Bug. Quadibloc <jsavard@ecn.ab.ca> - 2016-01-11 13:54 -0800
        Re: Intel's Skylake Prime Number Bug. Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2016-01-11 22:21 +0000
          Re: Intel's Skylake Prime Number Bug. krw <krw@nowhere.com> - 2016-01-11 21:38 -0500
        Re: Intel's Skylake Prime Number Bug. krw <krw@nowhere.com> - 2016-01-11 21:37 -0500
        Re: Intel's Skylake Prime Number Bug. Robert Baer <robertbaer@localnet.com> - 2016-01-12 20:23 -0800
        Re: Intel's Skylake Prime Number Bug. John Levine <johnl@iecc.com> - 2016-01-13 05:19 +0000
          Re: Intel's Skylake Prime Number Bug. already5chosen@yahoo.com - 2016-01-13 01:55 -0800
    Re: Intel's Skylake Prime Number Bug. Keith Thompson <kst-u@mib.org> - 2016-01-11 23:46 -0800

Page 7 of 10 — ← Prev page 1 … 5 6 [7] 8 9 10  Next page →


#33115 — Re: t cluttered

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-25 19:57 +0000
SubjectRe: t cluttered
Message-ID<n85umr$ho9$1@dont-email.me>
In reply to#33111
In article <jwvtwm1iiy7.fsf-monnier+comp.arch@gnu.org>,
Stefan Monnier  <monnier@iro.umontreal.ca> wrote:
>>> IOW instead of "array[hash % size]" you do "lookup_btree(hash)".
>[...]
>> Also, hash tables work on some data that B-trees don't,
>> and conversely.
>
>I'm not talking about using a B-tree directly: as you see in my quoted
>message, the B-tree is indexes by the *hash* (typically a 32 or 64bit
>integer).

Well, you can do that, but I don't see the point.  If a hash is bad
enough to need a B-tree, abandon it and use a better one.  If it
if fixed by the requirement, then hash the hash using a decent one.
And, if the hash table is too big, index it by another layer of
hash table.

The only real advantage of B-trees is when the index (i.e. hash, in
this case) is ordered.


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#33131 — Re: t cluttered

FromBruce Hoult <bruce.hoult@gmail.com>
Date2016-01-26 00:17 -0800
SubjectRe: t cluttered
Message-ID<3c096c85-1d51-430a-b827-9e89a20cf01b@googlegroups.com>
In reply to#33115
On Monday, January 25, 2016 at 11:00:04 PM UTC+3, Nick Maclaren wrote:
> In article <jwvtwm1iiy7.fsf-monnier+comp.arch@gnu.org>,
> Stefan Monnier  <monnier@iro.umontreal.ca> wrote:
> >>> IOW instead of "array[hash % size]" you do "lookup_btree(hash)".
> >[...]
> >> Also, hash tables work on some data that B-trees don't,
> >> and conversely.
> >
> >I'm not talking about using a B-tree directly: as you see in my quoted
> >message, the B-tree is indexes by the *hash* (typically a 32 or 64bit
> >integer).
> 
> Well, you can do that, but I don't see the point.  If a hash is bad
> enough to need a B-tree, abandon it and use a better one.  If it
> if fixed by the requirement, then hash the hash using a decent one.
> And, if the hash table is too big, index it by another layer of
> hash table.

Even the best hash functions have collisions. Sometimes it's useful to provide a small array to store colliding values together rather than have to load another cache line to follow a chain.

As you probably know, if you map N random values into N slots, you expect that 1/e of the slots (36.8%) will be empty, 1/e will have one item, 1/(e*2!) (19.4%) will have two items, and so on. 98.1% of slots will have three or fewer items, and 99.6% will have four or fewer.

Thus it makes sense to provide room for up to three or four items, plus some kind of chaining for more than that.

But it's nothing near wanting a B-tree. A linear search will do fine.

[toc] | [prev] | [next] | [standalone]


#33139 — Re: t cluttered

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-26 10:00 +0000
SubjectRe: t cluttered
Message-ID<n87g4o$buv$1@dont-email.me>
In reply to#33131
In article <3c096c85-1d51-430a-b827-9e89a20cf01b@googlegroups.com>,
Bruce Hoult  <bruce.hoult@gmail.com> wrote:
>
>Even the best hash functions have collisions. Sometimes it's useful to
>provide a small array to store colliding values together rather than
>have to load another cache line to follow a chain.
>
>But it's nothing near wanting a B-tree. A linear search will do fine.

Yes.  I was assuming that those (and other methods) are simply part
of implementing a decent hash table lookup.


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#33058 — Re: t cluttered

Fromjgk@panix.com (Joe keane)
Date2016-01-23 18:59 +0000
SubjectRe: t cluttered
Message-ID<n80ihl$d9n$1@reader1.panix.com>
In reply to#33012
In article <jwv60ymk9ca.fsf-monnier+comp.arch@gnu.org>,
Stefan Monnier  <monnier@iro.umontreal.ca> wrote:
>IOW instead of "array[hash % size]" you do "lookup_btree(hash)".

too many instructions, not clearly better on access pattern

[toc] | [prev] | [next] | [standalone]


#32882 — Re: t cluttered

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2016-01-19 19:28 +0700
SubjectRe: t cluttered
Message-ID<n7la53$1vir$1@gioia.aioe.org>
In reply to#32875
already5chosen@yahoo.com wrote:
> On Tuesday, January 19, 2016 at 12:01:12 PM UTC+2, Terje Mathisen wrote:
>> What I haven't seen any compiler do automatically is a dynamic
>> conversion, i.e. where you have a loop dividing many numbers by the same
>> integer value: As long as the loop count is 2-3 or higher it is faster
>> to calculate the reciprocal and then use that inside the loop.
>>
>
> How would compiler know that the value of divider is small?

That's the beauty of the algorithm, it doesn't just work for small 
numbers but for any unsigned values that will fit in a register!

I.e. using 32-bit registers you can convert any x / N into a reciprocal 
mul, as long as N is in the 1..2^32-1 range.

The key is that for this to work, the exact reciprocal value must be 
rounded UP to 33 significant bits, which means that half of all such 
reciprocals will have a trailing 0 bit and the other half will end in 1, 
right?

For an even reciprocal you just multiply by those 32 bits, take the high 
half of the 64-bit result and shift that down by however many bits you 
initially needed to shift up the reciprocal so that it would start with 
a 1 bit in the most significant position.

In the case of an odd reciprocal you need to effectively do a 32x32->64 
MUL, then add the x value to the low half and propagate any carry. There 
are other methods to do the correction as well, but the above is the 
easiest on x86.

Terje
-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [next] | [standalone]


#32929 — Re: t cluttered

Fromalready5chosen@yahoo.com
Date2016-01-19 15:41 -0800
SubjectRe: t cluttered
Message-ID<c7a7f7e3-9a48-4124-8cb0-d3695431279a@googlegroups.com>
In reply to#32882
On Tuesday, January 19, 2016 at 2:28:23 PM UTC+2, Terje Mathisen wrote:
> already5chosen@yahoo.com wrote:
> > On Tuesday, January 19, 2016 at 12:01:12 PM UTC+2, Terje Mathisen wrote:
> >> What I haven't seen any compiler do automatically is a dynamic
> >> conversion, i.e. where you have a loop dividing many numbers by the same
> >> integer value: As long as the loop count is 2-3 or higher it is faster
> >> to calculate the reciprocal and then use that inside the loop.
> >>
> >
> > How would compiler know that the value of divider is small?
> 
> That's the beauty of the algorithm, it doesn't just work for small 
> numbers but for any unsigned values that will fit in a register!
> 
> I.e. using 32-bit registers you can convert any x / N into a reciprocal 
> mul, as long as N is in the 1..2^32-1 range.
> 
> The key is that for this to work, the exact reciprocal value must be 
> rounded UP to 33 significant bits, 

O.k.
So you start your setup phase with normalization.
Q1.
ceil(log2(divisor)) or floor(log2(divisor))? In the other words, does divisor=4 belongs to the same range as 3 or to the same range as 5?
Q2.
For divisors in range [2^31..2^32-1] (or, at least, [2^31+1..2^32-1]) we need 65b/32b=33b right? That's not directly available even on x386. So, subtraction step before division?
Q3.
How many helper values produced and saved by setup phase, 2 or 3?


> which means that half of all such 
> reciprocals will have a trailing 0 bit and the other half will end in 1, 
> right?
> 
> For an even reciprocal you just multiply by those 32 bits, take the high 
> half of the 64-bit result and shift that down by however many bits you 
> initially needed to shift up the reciprocal so that it would start with 
> a 1 bit in the most significant position.
>

Q4. (related to Q3)
So, depending on even/odd reciprocal we'll have to do different calculations in the inner loop (if (even) {...} else {...}) ?

> In the case of an odd reciprocal you need to effectively do a 32x32->64 
> MUL, then add the x value to the low half and propagate any carry. There 
> are other methods to do the correction as well, but the above is the 
> easiest on x86.
> 

Q5.
That last part I don't understand.
If we have full 33-bit reciprocal, does not it mean that we have to produce 65-bit result of multiplication before we can start shifting to the rigth?
Something like 
mov eax, [x]
mov edx, [reciprocal]
mul eax
xor ebx, ebx
add eax, eax
adc edx, edx
adc ebx, ebx
Now the intermediate result in ebx:edx should be shifted to the right by count in range 0..32, with by itself not so easy. Or, may be the range is 0..31 which would be a little easier?

Q6.
How do you handle a case of divisor=1 ? It does not seem to fit in either even reciprocal or odd reciprocal cases.


> Terje
> -- 
> - <Terje.Mathisen at tmsw.no>
> "almost all programming can be viewed as an exercise in caching"

Conclusion: 
May be, I didn't understand all details, but to me it looks like very complicated and not very fast business. On most 32-bit general-purpose processors it would be faster (and FAR simpler) to just use double-precision floating-point. May be, on 64-bit processors required integer quirks are a little easier, but even here FP looks like safer bet.

[toc] | [prev] | [next] | [standalone]


#32950 — Re: t cluttered

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2016-01-20 15:20 +0100
SubjectRe: t cluttered
Message-ID<n7o53q$bja$1@gioia.aioe.org>
In reply to#32929
already5chosen@yahoo.com wrote:
> Q5. That last part I don't understand. If we have full 33-bit
> reciprocal, does not it mean that we have to produce 65-bit result of
> multiplication before we can start shifting to the rigth? Something

No, we just need to generate a 64-bit result which when truncated to 32 
bits will be correct, i.e. the final bit doesn't matter.

> Q6. How do you handle a case of divisor=1 ? It does not seem to fit
> in either even reciprocal or odd reciprocal cases.

1 is indeed a problem, if this can occur then it is probably best 
handled with an if/else which takes care of all powers of two, even 
though 2/4/8 etc works OK with a reciprocal of 0x80000000 and the 
corresponding shift from 0 to 31 bits.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [next] | [standalone]


#32878 — Re: t cluttered

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-19 11:25 +0000
SubjectRe: t cluttered
Message-ID<n7l6ef$sqr$1@dont-email.me>
In reply to#32871
In article <n7l1gu$1fsq$1@gioia.aioe.org>,
Terje Mathisen  <terje.mathisen@tmsw.no> wrote:
>
>> Another possibility is a (mainly integer) division by a smallish
>> constant.  That's almost common enough to be justifiable, and could
>> easily be implemented as a multiplication plus fiddling.  But, if you
>> have a good single*single=>double operation, the compiler can damn
>> well do that itself!  Converting float/15.0 to float*(1.0/15.0) has
>> been done from time immemorial.
>>
>> I don't know why so few compilers do that for integers, though; it
>> has always struck me as being one of their many blind spots.
>
>Oh, but they do!
>
>15-20 years ago I had the great pleasure of rediscovering how to do 
>exact integer division using reciprocal muls, at that time almost no 
>compilers did the same.

Do you know when they started to?  I thought that I had checked fairly
recently, but 'recently' at my age can be quite a long time ago :-)
My episode of rediscovering that was a decade or two before yours,
and it was an old technique long before that.


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32884 — Re: t cluttered

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2016-01-19 19:48 +0700
SubjectRe: t cluttered
Message-ID<n7lbbg$2a0$1@gioia.aioe.org>
In reply to#32878
Nick Maclaren wrote:
> In article <n7l1gu$1fsq$1@gioia.aioe.org>,
> Terje Mathisen  <terje.mathisen@tmsw.no> wrote:
>>
>>> Another possibility is a (mainly integer) division by a smallish
>>> constant.  That's almost common enough to be justifiable, and could
>>> easily be implemented as a multiplication plus fiddling.  But, if you
>>> have a good single*single=>double operation, the compiler can damn
>>> well do that itself!  Converting float/15.0 to float*(1.0/15.0) has
>>> been done from time immemorial.
>>>
>>> I don't know why so few compilers do that for integers, though; it
>>> has always struck me as being one of their many blind spots.
>>
>> Oh, but they do!
>>
>> 15-20 years ago I had the great pleasure of rediscovering how to do
>> exact integer division using reciprocal muls, at that time almost no
>> compilers did the same.
>
> Do you know when they started to?  I thought that I had checked fairly
> recently, but 'recently' at my age can be quite a long time ago :-)
> My episode of rediscovering that was a decade or two before yours,
> and it was an old technique long before that.

I've just tried to figure out when I was contacted by Agner Fog, in 
order to determine a better timeline, but I could not find it.

Anyway, it is at least 10 years ago that I started to notice compilers 
always generating reciprocal muls.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [next] | [standalone]


#32897 — Re: t cluttered

FromWalter Banks <walter@bytecraft.com>
Date2016-01-19 09:54 -0500
SubjectRe: t cluttered
Message-ID<n7limo$fnm$1@gioia.aioe.org>
In reply to#32884
On 19/01/2016 7:48 AM, Terje Mathisen wrote:
> Nick Maclaren wrote:
>> In article <n7l1gu$1fsq$1@gioia.aioe.org>, Terje Mathisen
>> <terje.mathisen@tmsw.no> wrote:
>>>
>>>> Another possibility is a (mainly integer) division by a
>>>> smallish constant.  That's almost common enough to be
>>>> justifiable, and could easily be implemented as a
>>>> multiplication plus fiddling.  But, if you have a good
>>>> single*single=>double operation, the compiler can damn well do
>>>> that itself!  Converting float/15.0 to float*(1.0/15.0) has
>>>> been done from time immemorial.
>>>>
>>>> I don't know why so few compilers do that for integers, though;
>>>> it has always struck me as being one of their many blind
>>>> spots.
>>>
>>> Oh, but they do!
>>>
>>> 15-20 years ago I had the great pleasure of rediscovering how to
>>> do exact integer division using reciprocal muls, at that time
>>> almost no compilers did the same.
>>
>> Do you know when they started to?  I thought that I had checked
>> fairly recently, but 'recently' at my age can be quite a long time
>> ago :-) My episode of rediscovering that was a decade or two before
>> yours, and it was an old technique long before that.
>
> I've just tried to figure out when I was contacted by Agner Fog, in
> order to determine a better timeline, but I could not find it.
>
> Anyway, it is at least 10 years ago that I started to notice
> compilers always generating reciprocal muls.
>

Time flies for all of us, especially when we are having fun. I just
checked our compiler sources. We started to use reciprocal mults in 1993
for some ISA's and we were far from the first to do so. I am sure both
Terje and Nick were well aware of reciprocal mults well before that time.

[toc] | [prev] | [next] | [standalone]


#32901 — Re: t cluttered

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-19 16:49 +0000
SubjectRe: t cluttered
Message-ID<n7lpeh$86c$1@dont-email.me>
In reply to#32897
In article <n7limo$fnm$1@gioia.aioe.org>,
Walter Banks  <walter@bytecraft.com> wrote:
>
>Time flies for all of us, especially when we are having fun. I just
>checked our compiler sources. We started to use reciprocal mults in 1993
>for some ISA's and we were far from the first to do so. I am sure both
>Terje and Nick were well aware of reciprocal mults well before that time.

And when we are getting old!  Thanks very much for the date.


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32931 — Re: t cluttered

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-19 17:25 -0800
SubjectRe: t cluttered
Message-ID<940a78ba-1321-4e1e-9186-787389e18e5e@googlegroups.com>
In reply to#32871
On Tuesday, January 19, 2016 at 3:01:12 AM UTC-7, Terje Mathisen wrote:
> how to do 
> exact integer division using reciprocal muls,

Ah, so it is possible.

In the case of the Burroughs Scientific Processor, I believe that the fact that 
17 * 15 = 255 was used; divide by 17 by first multiplying by 15, then divide by 
255 using a reciprocal multiply since the structure of the reciprocal is simple.

This much I knew, but not the details of how to make sure you get an exact 
result in this case or the general case.

John Savard

[toc] | [prev] | [next] | [standalone]


#32933 — Re: t cluttered

FromQuadibloc <jsavard@ecn.ab.ca>
Date2016-01-19 17:43 -0800
SubjectRe: t cluttered
Message-ID<844e6946-9310-428b-a043-34a75f2076ea@googlegroups.com>
In reply to#32931
On Tuesday, January 19, 2016 at 6:25:54 PM UTC-7, Quadibloc wrote:

> This much I knew, but not the details of how to make sure you get an exact 
> result in this case or the general case.

Further thought has led me to realize that if the error in reciprocal 
multiplication is *bounded*, then of course you can guarantee that adding .5 and 
truncating will give an exact result when the bound is less than +/- .5, as will 
quite normally be the case.

John Savard

[toc] | [prev] | [next] | [standalone]


#32948 — Re: t cluttered

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2016-01-20 14:52 +0100
SubjectRe: t cluttered
Message-ID<n7o3eo$8m6$1@gioia.aioe.org>
In reply to#32931
Quadibloc wrote:
> On Tuesday, January 19, 2016 at 3:01:12 AM UTC-7, Terje Mathisen wrote:
>> how to do
>> exact integer division using reciprocal muls,
>
> Ah, so it is possible.
>
> In the case of the Burroughs Scientific Processor, I believe that the fact that
> 17 * 15 = 255 was used; divide by 17 by first multiplying by 15, then divide by
> 255 using a reciprocal multiply since the structure of the reciprocal is simple.

The MUL by 15 was probably a shift & subtract, so two stages, while the 
DIV by 255 requires a reciprocal with one bit set for every 8 bits of 
address range, right?

>
> This much I knew, but not the details of how to make sure you get an exact
> result in this case or the general case.

The insight I had was that if I had a value y, an exact reciprocal r=1/y 
  and a 32-bit value x to be divided, then z = x * r will be greater or 
equal to the result of a DIV (z' = x DIV y) since the division truncates 
any fractional result, right?

The difference eps = z - z' is by definition less than one ulp, so what 
happens if we use an approximate reciprocal r'?

If r' is slightly larger than r (er = r' - r) then the error after 
multiplication will be er*x which is less than er*2^32:

If we can make sure that er is always less 1/2^32 the product will be 
less than 1, so it all works out.

Re how to do this dynamically:

One method is to always generate a normalized 33-bit reciprocal and do 
the multiplication using the lower 32 bits which will vary and then add 
x to the top half of the product. This can of course overflow!

Another method is to to add the final bit using AND/ADD/ADC, i.e. store 
a mask so that the code becomes like this:

   mov eax,[recip]
   mul ebx
   and ebx,[mask]
   add eax,ebx
   adc edx,0
   mov cl,[shift]
   shr edx,cl

Here the setup code will have to calculate the reciprocal (which is 1 
for all powers of two!), the mask which is either -1 or 0 depending upon 
the 33rd/trailing reciprocal bit, and finally the shift which is needed 
to correct for the initial normalization.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [next] | [standalone]


#32872 — Re: t cluttered

Fromalready5chosen@yahoo.com
Date2016-01-19 02:14 -0800
SubjectRe: t cluttered
Message-ID<856a220d-2367-4c07-8e27-a1307dbe5b55@googlegroups.com>
In reply to#32870
On Tuesday, January 19, 2016 at 11:46:18 AM UTC+2, Nick Maclaren wrote:
> In article <n7js7n$qb$1@dont-email.me>,
> Ivan Godard  <ivan@millcomputing.com> wrote:
> >On 1/18/2016 5:37 AM, Mike Stump wrote:
> >
> >>> And there's some doubt whether we will ever have hardware division.
> >>
> >> Curious.  Not even a slow one?
> >
> >Nope. It is very hard to pipeline a division, and non-pipelined FUs 
> >really gum up a fast machine. There's a hardware recip approximation, 
> >but the subsequent NR stages are much better done as separate ops. 
> >Likewise for sqrt and the transcendentals.
> 
> And there is very little point in a slow hardware division, anyway.
> As we have discussed before, Newton-Raphson can be pipelined to a
> limited extent and, provided that those stages are integrated in
> the numeric instruction stream, that's about as fast as hardware
> division on almost all existing systems. 

Do you have numbers to back the above claim?
As far as I know, if we interpret 'about as fast' as "latency of DP division implemented by NR is within factor of 1.5 of HW" then it was wrong on Intel CPUs for as long as I remember (which is >15 years).
Recently (since Broadwell) it became wrong even for throughput of DP division. It is possible that NR is still slightly ahead for vectorized throughput of SP division, but even that is not sure.

I didn't look at hard data on other fast CPUs. Are they different in that regard?

> As you say, doing better
> has been an intractable problem for six decades.

Sounds wrong, at least for latency. Add more hardware + bigger LUTs and you will easily leave NR far behind. And that even before we start to discuss IEEE requirements for division.

> 
> Another possibility is a (mainly integer) division by a smallish
> constant.  That's almost common enough to be justifiable, and could
> easily be implemented as a multiplication plus fiddling.  But, if you
> have a good single*single=>double operation, the compiler can damn
> well do that itself!  Converting float/15.0 to float*(1.0/15.0) has
> been done from time immemorial.
> 
> I don't know why so few compilers do that for integers, though; it
> has always struck me as being one of their many blind spots.
>

I don't remember the last time I encountered compiler that *does not* do it for small integers.

> 
> Regards,
> Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32874 — Re: t cluttered

FromIvan Godard <ivan@millcomputing.com>
Date2016-01-19 02:33 -0800
SubjectRe: t cluttered
Message-ID<n7l38b$gr9$1@dont-email.me>
In reply to#32872
On 1/19/2016 2:14 AM, already5chosen@yahoo.com wrote:
> On Tuesday, January 19, 2016 at 11:46:18 AM UTC+2, Nick Maclaren
> wrote:

<snip>

>> And there is very little point in a slow hardware division,
>> anyway. As we have discussed before, Newton-Raphson can be
>> pipelined to a limited extent and, provided that those stages are
>> integrated in the numeric instruction stream, that's about as fast
>> as hardware division on almost all existing systems.
>
> Do you have numbers to back the above claim? As far as I know, if we
> interpret 'about as fast' as "latency of DP division implemented by
> NR is within factor of 1.5 of HW" then it was wrong on Intel CPUs for
> as long as I remember (which is >15 years). Recently (since
> Broadwell) it became wrong even for throughput of DP division. It is
> possible that NR is still slightly ahead for vectorized throughput of
> SP division, but even that is not sure.
>
> I didn't look at hard data on other fast CPUs. Are they different in
> that regard?
>
>> As you say, doing better has been an intractable problem for six
>> decades.
>
> Sounds wrong, at least for latency. Add more hardware + bigger LUTs
> and you will easily leave NR far behind. And that even before we
> start to discuss IEEE requirements for division.

Please expand. I was under the impression that the usual OOO division 
was just NR done in the microcode engine, which for us might as well be 
macrocode. Where do LUTs come in, once past the initial approximation 
that you use to start the NR? And are you referring only to FP divide, 
or also integer?

[toc] | [prev] | [next] | [standalone]


#32876 — Re: t cluttered

Fromalready5chosen@yahoo.com
Date2016-01-19 02:57 -0800
SubjectRe: t cluttered
Message-ID<58d0791c-3a51-4e06-aebc-d3b1eb12c147@googlegroups.com>
In reply to#32874
On Tuesday, January 19, 2016 at 12:33:22 PM UTC+2, Ivan Godard wrote:
> On 1/19/2016 2:14 AM, already5chosen@yahoo.com wrote:
> > On Tuesday, January 19, 2016 at 11:46:18 AM UTC+2, Nick Maclaren
> > wrote:
> 
> <snip>
> 
> >> And there is very little point in a slow hardware division,
> >> anyway. As we have discussed before, Newton-Raphson can be
> >> pipelined to a limited extent and, provided that those stages are
> >> integrated in the numeric instruction stream, that's about as fast
> >> as hardware division on almost all existing systems.
> >
> > Do you have numbers to back the above claim? As far as I know, if we
> > interpret 'about as fast' as "latency of DP division implemented by
> > NR is within factor of 1.5 of HW" then it was wrong on Intel CPUs for
> > as long as I remember (which is >15 years). Recently (since
> > Broadwell) it became wrong even for throughput of DP division. It is
> > possible that NR is still slightly ahead for vectorized throughput of
> > SP division, but even that is not sure.
> >
> > I didn't look at hard data on other fast CPUs. Are they different in
> > that regard?
> >
> >> As you say, doing better has been an intractable problem for six
> >> decades.
> >
> > Sounds wrong, at least for latency. Add more hardware + bigger LUTs
> > and you will easily leave NR far behind. And that even before we
> > start to discuss IEEE requirements for division.
> 
> Please expand. I was under the impression that the usual OOO division 
> was just NR done in the microcode engine, which for us might as well be 
> macrocode. Where do LUTs come in, once past the initial approximation 
> that you use to start the NR? And are you referring only to FP divide, 
> or also integer?

According to my understanding, Intel uses Sweeney, Robertson, and Tocher algorithm or, more likely, modified variant of the same old idea. They increase the radix every few generations.

[toc] | [prev] | [next] | [standalone]


#32879 — Re: t cluttered

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2016-01-19 11:34 +0000
SubjectRe: t cluttered
Message-ID<n7l70f$ur3$1@dont-email.me>
In reply to#32872
In article <856a220d-2367-4c07-8e27-a1307dbe5b55@googlegroups.com>,
 <already5chosen@yahoo.com> wrote:
>> 
>> And there is very little point in a slow hardware division, anyway.
>> As we have discussed before, Newton-Raphson can be pipelined to a
>> limited extent and, provided that those stages are integrated in
>> the numeric instruction stream, that's about as fast as hardware
>> division on almost all existing systems. 
>
>Do you have numbers to back the above claim?
>As far as I know, if we interpret 'about as fast' as "latency of DP
>division implemented by NR is within factor of 1.5 of HW" then it was
>wrong on Intel CPUs for as long as I remember (which is >15 years).
>Recently (since Broadwell) it became wrong even for throughput of DP
>division. It is possible that NR is still slightly ahead for vectorized
>throughput of SP division, but even that is not sure.

The main reason that it is slower is that my proviso is false.  The
biggest problem in implementing it is the unsuitability of the basic
hardware primitives.  I certainly did have, but it was a while back.
In the light of Terje's correction, I might be out of date as far
as the actual speed is concerned.

>I didn't look at hard data on other fast CPUs. Are they different in
>that regard?

I haven't looked recently, but they varied.  Any system where division
is more than 3 times slower than multiplication is one where Newton-
Raphson is potentially faster.  And see below.

>> As you say, doing better
>> has been an intractable problem for six decades.
>
>Sounds wrong, at least for latency. Add more hardware + bigger LUTs and
>you will easily leave NR far behind. And that even before we start to
>discuss IEEE requirements for division.

Yes, but think chip area and power in watts.  It's intractable, not
because it can't be done, but because it needs a disproportionate
amount of the available resources to do it better.


Regards,
Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32888 — Re: t cluttered

Fromalready5chosen@yahoo.com
Date2016-01-19 05:24 -0800
SubjectRe: t cluttered
Message-ID<5ae638bc-3f6e-439d-953e-399f1a4774b7@googlegroups.com>
In reply to#32879
On Tuesday, January 19, 2016 at 1:37:27 PM UTC+2, Nick Maclaren wrote:
> In article <856a220d-2367-4c07-8e27-a1307dbe5b55@googlegroups.com>,
>  <already5chosen@yahoo.com> wrote:
> >> 
> >> And there is very little point in a slow hardware division, anyway.
> >> As we have discussed before, Newton-Raphson can be pipelined to a
> >> limited extent and, provided that those stages are integrated in
> >> the numeric instruction stream, that's about as fast as hardware
> >> division on almost all existing systems. 
> >
> >Do you have numbers to back the above claim?
> >As far as I know, if we interpret 'about as fast' as "latency of DP
> >division implemented by NR is within factor of 1.5 of HW" then it was
> >wrong on Intel CPUs for as long as I remember (which is >15 years).
> >Recently (since Broadwell) it became wrong even for throughput of DP
> >division. It is possible that NR is still slightly ahead for vectorized
> >throughput of SP division, but even that is not sure.
> 
> The main reason that it is slower is that my proviso is false. 

Unfortunately, on x86/DP it is too true. x86 ISA, at least up to and including AVX2, provides no good tools for initial approximation of reciprocal of double-precision floating point numbers.
ARMv7 (VPF and NEON) is no better. 
ARMv8 *is* better.

> The
> biggest problem in implementing it is the unsuitability of the basic
> hardware primitives.  I certainly did have, but it was a while back.
> In the light of Terje's correction, I might be out of date as far
> as the actual speed is concerned.
> 
> >I didn't look at hard data on other fast CPUs. Are they different in
> >that regard?
> 
> I haven't looked recently, but they varied.  Any system where division
> is more than 3 times slower than multiplication is one where Newton-
> Raphson is potentially faster.  And see below.
> 
> >> As you say, doing better
> >> has been an intractable problem for six decades.
> >
> >Sounds wrong, at least for latency. Add more hardware + bigger LUTs and
> >you will easily leave NR far behind. And that even before we start to
> >discuss IEEE requirements for division.
> 
> Yes, but think chip area and power in watts.  It's intractable, not
> because it can't be done, but because it needs a disproportionate
> amount of the available resources to do it better.
> 
> 
> Regards,
> Nick Maclaren.

[toc] | [prev] | [next] | [standalone]


#32928 — Re: t cluttered

From"James Van Buskirk" <not_valid@comcast.net>
Date2016-01-19 15:46 -0700
SubjectRe: t cluttered
Message-ID<n7me78$r9$1@dont-email.me>
In reply to#32888
wrote in message 
news:5ae638bc-3f6e-439d-953e-399f1a4774b7@googlegroups.com...

> Unfortunately, on x86/DP it is too true. x86 ISA, at least up
> to and including AVX2, provides no good tools for initial
> approximation of reciprocal of double-precision floating
> point numbers.
> ARMv7 (VPF and NEON) is no better.
> ARMv8 *is* better.

AVX2 is fine.  It can get a relative error 2.5-sqrt(6.0) in 3 clock
cycles and it only takes 25 clock cycles for 4 Newton-Raphson
iterations to clean up the mess.

D:\gfortran\clf\reciprocal>type recip.asm
format MS64 coff

public recip
section '.text' code readable executable
recip:
; Load constants and input
   vmovdqa [rsp+8], xmm6
   vbroadcastsd ymm1, [one]
   vbroadcastsd ymm2, [two]
   vpbroadcastq ymm3, [hibit]
   vpbroadcastq ymm4, [magic]
   vmovdqa ymm0, [rcx]
; ymm0 is input
; Begin approximation
   vpand ymm5, ymm3, ymm0
   vpandn ymm6, ymm3, ymm0
   vpsubq ymm6, ymm4, ymm6
   vpor ymm6, ymm6, ymm5
; ymm6 is initial approximation
; First N-R iteration
   vmovaps ymm5, ymm1
   vfnmadd231pd ymm5, ymm0, ymm6
   vfnmadd132pd ymm0, ymm2, ymm6
   vmulpd ymm5, ymm5, ymm5
   vmulpd ymm0, ymm6, ymm0
; Second N-R iteration
   vfmadd132pd ymm0, ymm0, ymm5
   vmulpd ymm5, ymm5, ymm5
; Third N-R iteration
   vfmadd132pd ymm0, ymm0, ymm5
   vmulpd ymm5, ymm5, ymm5
; Fourth N-R iteration
   vfmadd132pd ymm0, ymm0, ymm5
; Store output
   vmovaps [rcx], ymm0
   vmovdqa xmm6, [rsp+8]
   ret

section '.data' readable writeable align 16
   one dq 3FF0000000000000h
   two dq 4000000000000000h
   hibit dq 8000000000000000h
   magic dq 7FDE6238502484BAh

D:\gfortran\clf\reciprocal>fasm recip.asm
flat assembler  version 1.71.49  (1048576 kilobytes memory)
3 passes, 348 bytes.

D:\gfortran\clf\reciprocal>type test.f90
program test
   use ISO_FORTRAN_ENV
   implicit none
   interface
      subroutine recip(x) bind(C,name='recip')
         import
         implicit none
         real(REAL64) x(4)
      end subroutine recip
   end interface
   real(REAL64) x(108), y(108), r1
   integer i

   r1 = 4/(sqrt(6.0_REAL64)+2)
   x(1) = 1
   x(2) = nearest(x(1),x(1))
   x(3:46) = [(1+1.0e-2_REAL64*i,i=1,44)]
   x(47) = 1+r1/2
   x(48:92) = [(1+1.0e-2_REAL64*i,i=45,89)]
   x(93) = 1+r1
   x(94:98) = [(1+1.0e-2_REAL64*i,i=90,94)]
   x(99) = (3+r1)/2
   x(100:104) = [(1+1.0e-2_REAL64*i,i=95,99)]
   x(106:108) = [(1+1.0e-2_REAL64*i,i=100,102)]
   x(105) = nearest(x(106),-x(106))
   y = x
   do i = 1, size(y), 4
      call recip(y(i))
   end do
   do i = 1, size(x)
      write(*,*) x(i), y(i), 1/x(i)
   end do
end program test

D:\gfortran\clf\reciprocal>ifort /QxCORE-AVX2 /nologo test.f90 recip.obj

D:\gfortran\clf\reciprocal>test
   1.00000000000000        1.00000000000000        1.00000000000000
   1.00000000000000        1.00000000000000        1.00000000000000
   1.01000000000000       0.990099009900990       0.990099009900990
   1.02000000000000       0.980392156862745       0.980392156862745
   1.03000000000000       0.970873786407767       0.970873786407767
   1.04000000000000       0.961538461538461       0.961538461538461
   1.05000000000000       0.952380952380952       0.952380952380952
   1.06000000000000       0.943396226415094       0.943396226415094
   1.07000000000000       0.934579439252336       0.934579439252336
   1.08000000000000       0.925925925925926       0.925925925925926
   1.09000000000000       0.917431192660550       0.917431192660550
   1.10000000000000       0.909090909090909       0.909090909090909
   1.11000000000000       0.900900900900901       0.900900900900901
   1.12000000000000       0.892857142857143       0.892857142857143
   1.13000000000000       0.884955752212389       0.884955752212389
   1.14000000000000       0.877192982456140       0.877192982456140
   1.15000000000000       0.869565217391304       0.869565217391304
   1.16000000000000       0.862068965517241       0.862068965517241
   1.17000000000000       0.854700854700855       0.854700854700855
   1.18000000000000       0.847457627118644       0.847457627118644
   1.19000000000000       0.840336134453782       0.840336134453782
   1.20000000000000       0.833333333333333       0.833333333333333
   1.21000000000000       0.826446280991736       0.826446280991736
   1.22000000000000       0.819672131147541       0.819672131147541
   1.23000000000000       0.813008130081301       0.813008130081301
   1.24000000000000       0.806451612903226       0.806451612903226
   1.25000000000000       0.800000000000000       0.800000000000000
   1.26000000000000       0.793650793650794       0.793650793650794
   1.27000000000000       0.787401574803150       0.787401574803150
   1.28000000000000       0.781250000000000       0.781250000000000
   1.29000000000000       0.775193798449612       0.775193798449612
   1.30000000000000       0.769230769230769       0.769230769230769
   1.31000000000000       0.763358778625954       0.763358778625954
   1.32000000000000       0.757575757575757       0.757575757575758
   1.33000000000000       0.751879699248120       0.751879699248120
   1.34000000000000       0.746268656716418       0.746268656716418
   1.35000000000000       0.740740740740741       0.740740740740741
   1.36000000000000       0.735294117647059       0.735294117647059
   1.37000000000000       0.729927007299270       0.729927007299270
   1.38000000000000       0.724637681159420       0.724637681159420
   1.39000000000000       0.719424460431655       0.719424460431655
   1.40000000000000       0.714285714285714       0.714285714285714
   1.41000000000000       0.709219858156028       0.709219858156028
   1.42000000000000       0.704225352112676       0.704225352112676
   1.43000000000000       0.699300699300699       0.699300699300699
   1.44000000000000       0.694444444444445       0.694444444444444
   1.44948974278318       0.689897948556636       0.689897948556636
   1.45000000000000       0.689655172413793       0.689655172413793
   1.46000000000000       0.684931506849315       0.684931506849315
   1.47000000000000       0.680272108843537       0.680272108843537
   1.48000000000000       0.675675675675676       0.675675675675676
   1.49000000000000       0.671140939597315       0.671140939597315
   1.50000000000000       0.666666666666667       0.666666666666667
   1.51000000000000       0.662251655629139       0.662251655629139
   1.52000000000000       0.657894736842105       0.657894736842105
   1.53000000000000       0.653594771241830       0.653594771241830
   1.54000000000000       0.649350649350649       0.649350649350649
   1.55000000000000       0.645161290322581       0.645161290322581
   1.56000000000000       0.641025641025641       0.641025641025641
   1.57000000000000       0.636942675159236       0.636942675159236
   1.58000000000000       0.632911392405063       0.632911392405063
   1.59000000000000       0.628930817610063       0.628930817610063
   1.60000000000000       0.625000000000000       0.625000000000000
   1.61000000000000       0.621118012422360       0.621118012422360
   1.62000000000000       0.617283950617284       0.617283950617284
   1.63000000000000       0.613496932515337       0.613496932515337
   1.64000000000000       0.609756097560975       0.609756097560976
   1.65000000000000       0.606060606060606       0.606060606060606
   1.66000000000000       0.602409638554217       0.602409638554217
   1.67000000000000       0.598802395209581       0.598802395209581
   1.68000000000000       0.595238095238095       0.595238095238095
   1.69000000000000       0.591715976331361       0.591715976331361
   1.70000000000000       0.588235294117647       0.588235294117647
   1.71000000000000       0.584795321637427       0.584795321637427
   1.72000000000000       0.581395348837209       0.581395348837209
   1.73000000000000       0.578034682080925       0.578034682080925
   1.74000000000000       0.574712643678161       0.574712643678161
   1.75000000000000       0.571428571428571       0.571428571428571
   1.76000000000000       0.568181818181818       0.568181818181818
   1.77000000000000       0.564971751412429       0.564971751412429
   1.78000000000000       0.561797752808989       0.561797752808989
   1.79000000000000       0.558659217877095       0.558659217877095
   1.80000000000000       0.555555555555556       0.555555555555556
   1.81000000000000       0.552486187845304       0.552486187845304
   1.82000000000000       0.549450549450549       0.549450549450549
   1.83000000000000       0.546448087431694       0.546448087431694
   1.84000000000000       0.543478260869565       0.543478260869565
   1.85000000000000       0.540540540540541       0.540540540540540
   1.86000000000000       0.537634408602151       0.537634408602151
   1.87000000000000       0.534759358288770       0.534759358288770
   1.88000000000000       0.531914893617021       0.531914893617021
   1.89000000000000       0.529100529100529       0.529100529100529
   1.89897948556636       0.526598632371090       0.526598632371090
   1.90000000000000       0.526315789473684       0.526315789473684
   1.91000000000000       0.523560209424084       0.523560209424084
   1.92000000000000       0.520833333333333       0.520833333333333
   1.93000000000000       0.518134715025907       0.518134715025907
   1.94000000000000       0.515463917525773       0.515463917525773
   1.94948974278318       0.512954737875335       0.512954737875335
   1.95000000000000       0.512820512820513       0.512820512820513
   1.96000000000000       0.510204081632653       0.510204081632653
   1.97000000000000       0.507614213197970       0.507614213197970
   1.98000000000000       0.505050505050505       0.505050505050505
   1.99000000000000       0.502512562814070       0.502512562814070
   2.00000000000000       0.500000000000000       0.500000000000000
   2.00000000000000       0.500000000000000       0.500000000000000
   2.01000000000000       0.497512437810945       0.497512437810945
   2.02000000000000       0.495049504950495       0.495049504950495

[toc] | [prev] | [next] | [standalone]


Page 7 of 10 — ← Prev page 1 … 5 6 [7] 8 9 10  Next page →

Back to top | Article view | comp.arch


csiph-web