From: Stas B. <sta...@gm...> - 2014-05-06 12:23:16
|
"Douglas Katzman" <sn...@us...> writes: > The branch "master" has been updated in SBCL: > via 46e70b8e713a8677882ed675115b01c82d823255 (commit) > from d55a3540322e28841b7712986887830c6a24d32e (commit) > > - Log ----------------------------------------------------------------- > commit 46e70b8e713a8677882ed675115b01c82d823255 > Author: Douglas Katzman <do...@go...> > Date: Tue May 6 08:14:29 2014 -0400 > > Three microoptimizations to numeric tag testing for 1-bit fixnum tag. > > Each of the following might save 1 byte on x86-64, depending on > register allocation. > > - Instead of "LEA EAX, [Rxx - other-pointer-lowtag]" use full-width RAX. > At worst this adds a REX prefix, but might not if Rxx needed it anyway. > The payback is in loading widetag from BYTE PTR [RAX]. > After the LEA we never need a displacement, which either breaks even > by saving 1 byte, or wins - nets a 1 byte savings if Rxx had required > a REX prefix. > Note: RAX is an alias pointer, but safe because of GC conservativism. > > These two depend on AL having the shortest encoding: > - Do the fixnum lowtag test only after loading RAX by checking for > a 1 bit instead of looking for a 0 bit in the original value. > - Similarly for SHORT-FLOAT, do the immediate tag test on AL > compensating for the biased value in the widetag field. The GC is conservative, but this will make it harder to make it precise. -- With best regards, Stas. |