Files
mercury/library
Zoltan Somogyi 17b1b0725d Optimize the tests for builtin types when printing terms.
library/stream.string_writer.m:
    When printing terms to a stream, we special case the handling
    of a whole bunch of builtin types. We used to test for these one by one,
    in sequence, which can be very slow.

    Switch to an approach where we first get the identity of the term's type,
    and we test for a type for one of these types *if, and only if*,
    the identity says that it is one of the types we want to special-case
    in one of the modules that has to-be-special-cased types.

    This code is significantly longer than the original, but
    (a) it should be significantly faster (it speeds up a microbenchmark
    by a bit more than a third), and (b) it should not slow down
    if we want to special-case the treatment of more types in the future.

tests/hard_coded/stream_string_writer_types.{m,exp}:
    A test to ensure that the assumptions that the new code in
    stream.string_writer.m makes about which builtin type is defined where
    are still valid.

tests/hard_coded/Mmakefile:
    Enable the new test case.
2019-10-17 17:56:14 +11:00
..
2019-06-24 16:38:42 +02:00
2019-08-21 12:43:14 +10:00
2019-10-17 16:51:33 +11:00
2018-08-08 21:17:12 +10:00
2018-06-26 17:24:40 +02:00
2019-09-19 22:18:33 +10:00
2019-09-25 08:58:15 +10:00
2019-07-26 01:46:51 +02:00
2019-07-30 11:10:54 +02:00
2019-08-20 19:02:57 +10:00
2019-06-26 23:41:16 +02:00
2019-06-26 23:41:16 +02:00
2019-06-26 23:41:16 +02:00
2019-09-25 08:58:15 +10:00
2019-10-17 16:12:50 +11:00