diprism / perpl

The PERPL Compiler
MIT License
10 stars 5 forks source link

Identity factors #97

Closed davidweichiang closed 1 year ago

davidweichiang commented 2 years ago

There are several places where sparse factors are created for packing/unpacking tuples or variants, which need to be made more efficient. I think there are just two kinds:

{
  "function": "directsum",
  "type": [ "a+b", "a" ],
  "sizes": [ 123, 456 ]
}
{
  "function": "tensorproduct",
  "type": [ "(a,b)", "a", "b" ],
  "sizes": [ 123, 456 ]
}
ccshan commented 2 years ago

What about equality, is it eliminated by some optimization already, or a special case of both of these kinds?

davidweichiang commented 2 years ago

I was thinking it’s a special case of both kinds.

On Mon, Aug 1, 2022 at 22:18 Chung-chieh Shan @.***> wrote:

What about equality, is it eliminated by some optimization already, or a special case of both of these kinds?

— Reply to this email directly, view it on GitHub https://github.com/diprism/perpl/issues/97#issuecomment-1201938629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKVY2PB3FRFGO2UZ5MOXLDVXCAPPANCNFSM55JM2GDQ . You are receiving this because you authored the thread.Message ID: @.***>