Remove special casing of singleton strings, split all strings, Re: Implement `decodeDouble_Int64#` primop

Joachim Breitner mail at
Wed Sep 17 18:56:43 UTC 2014


Am Dienstag, den 16.09.2014, 12:59 +0000 schrieb git at
> commit fe9f7e40844802443315ef2238c4cdefda756b62
> Author: Thijs Alkemade <thijsalkemade at>
> Date:   Tue Sep 16 07:55:34 2014 -0500
>     Remove special casing of singleton strings, split all strings.
>     Summary:
>     exprIsConApp_maybe now detects string literals and correctly
>     splits them. This means case-statemnts on string literals can
>     now push the literal into the cases.

if you are curious: This improves the runtime of the binary-trees nofib
benchmark by 6% and reduces the size of the parstof nofib benchmark by
4.6%, although on average, binary sizes are increased by a very small
amount (0.12%). There is a notable increase in allocations in bspt,
cacheprof and gg (>3%).


Am Mittwoch, den 17.09.2014, 15:58 +0000 schrieb git at
> commit b62bd5ecf3be421778e4835010b6b334e95c5a56
> Author: Herbert Valerio Riedel <hvr at>
> Date:   Wed Sep 17 17:54:20 2014 +0200
>     Implement `decodeDouble_Int64#` primop
>     The existing `decodeDouble_2Int#` primop is rather inconvenient to use
>     (and in fact is not even used by `integer-gmp`) as the mantissa is split
>     into 3 components which would actually fit in an `Int64#` value.
>     However, `decodeDouble_Int64#` is to be used by the new `integer-gmp2`
>     re-implementation (see #9281).
>     Moreover, `decodeDouble_2Int#` performs direct bit-wise operations on the
>     IEEE representation which can be replaced by a combination of the
>     portable standard C99 `scalbn(3)` and `frexp(3)` functions.

This commit undoes the improvement of binary-trees’s runtime (4.6%
regression), but no other notable changes.

Again, I leave it to the respective commiters to decide if any of this
is worth investigating.

for the history of that particular benchmark.


Joachim Breitner
  e-Mail: mail at
  Jabber-ID: nomeata at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ghc-devs mailing list