IEEE recommends -inf.
While CLHS has (complex (log (abs x)) (phase x)) as a definition (even
then, ambiguously it says "a complex logarithm"), we already don't
follow a similar definition for sqrt, (sqrt x) = (exp (/ (log x) 2)),
and return (sqrt -0.0) = -0.0
There also had been some confusion around type derivation and (log
(double-float 0d0)) derived as double-float. And an inlined log
produced -inf.
Do not put them into member types. Treat them like ordinary components
of numeric-union-type, using -0.0 < 0.0 instead of -0.0 = 0.0. Now the
only places where they have to be treated specially are generating
type checks and printing type specifiers, which can share the same
code.
At first glance these seem too large to beneficially inline, but because
they're all entirely confined to exactly 1 caller, we can nuke them
rather than remove the notinline on each.
which generally avoids more casting later when the strings are passed to other
(often user-written) foreign functions that expect ASCII. To further improve
this, it should be possible to avoid double-copy in places by pre-scanning
each char* pointer to determine whether to cast to base-string in one step.
Object allocation used to zero-fill GC pages (as needed) inside the lock scope.
It no longer does after rev 14c9b485 so there's not much to be gained by
measuring wait time, though I think pmrgc may have better lock usage than
gencgc, as it can optimistically look for - without locking - a usable page,
then try to obtain that exact page using the lock.
This little-used feature should not consume 96 words of TLS.
Instead access the vector of counts in a slot of *CURRENT-THREAD*,
making it more flexible and eliminating the TLS lock for reading.
Bignum's length is a 32-bit integer placed after an 8 bit widetag. It
can be loaded into a 32-bit register, removing a right shift.
And on x86-64, even if a shift is needed, loading a dword is one byte
shorter and shifting left by 1 is shorter than shifting by 7.
And don't use ASSERT to mean ERROR. It was that way since rev 0a3d799b
but invariant checks should be done using the lighter-weight AVER. Except
this is a type-check of user inputs. Almost nowhere else are users allowed
to edit the supplied args (apart from all the CLHS-stipulated restarts
on package operations perhaps) to system function in this manner.
Can't move a use with a fitting type directly after the cast if there
are intermediate nodes between the use and the cast. But if only one
use has a bad type the cast can be moved to that use.