RE: Performance of pattern synonyms

Are you as convinced as you were of the semantics of pattern synonyms? I can see they are the right semantics given a run-time implementation but the alternative compile-time implementation has a lot to recommend it.
What exactly is "the alternative compile-time implementation"?
Remember, although pattern synonyms are set up to call a matching function, that matching function is often inlined, which reduces the overhead to zero.
I say "often" inlined. An INLINE pragma for pattern synonyms would be a good feature.
Widening to ghc-devs.
Simon
From: Matthew Roberts

On Feb 11, 2019, at 8:55 AM, Simon Peyton Jones
wrote: What exactly is “the alternative compile-time implementation”?
In my response, I interpreted this to be macro-expansion, the alternative we discuss in the paper. The paper includes a nice discussion of how the semantics differs between what we currently have and macro-expansion. Richard

I'm looking at these links, but i'm actually having a hard time finding the
actual different definitions of this microbenchmark...
On Mon, Feb 11, 2019 at 9:22 AM Richard Eisenberg
On Feb 11, 2019, at 8:55 AM, Simon Peyton Jones
wrote: What exactly is “the alternative compile-time implementation”?
In my response, I interpreted this to be macro-expansion, the alternative we discuss in the paper. The paper includes a nice discussion of how the semantics differs between what we currently have and macro-expansion.
Richard _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
participants (3)
-
Carter Schonwald
-
Richard Eisenberg
-
Simon Peyton Jones