More efficient `Countable` instance for list and make `namespaces` independent of that.
It turns out we once had a more efficient Countable instance for lists, see 54954f55.
I have reverted that commit and fixed up namespaces.
This closes #28 (closed) ?
Merge request reports
Activity
Someone an idea which version of
Countable
is more efficient, the one in this MR or the one in #28 (closed)? It appears that they are both linear at least.14 14 Definition ndot {A A_dec A_count}:= unseal ndot_aux A A_dec A_count. 15 15 Definition ndot_eq : @ndot = @ndot_def := seal_eq ndot_aux. 16 16 17 Definition nclose_def (N : namespace) : coPset := coPset_suffixes (encode N). 17 (* Namespaces are encoded as 1 separated sequences of 0s corresponding to the 18 unary representation of the elements. *) Someone an idea which version of
Countable
is more efficient, the one in this MR or the one in #28 (closed)? It appears that they are both linear at least.I like how this reuses some existing infrastructure.
@jakobbotsch could you check if this version if "fast enough" for you, maybe even benchmark it against the one you wrote?
It is not really because products are interleaved -- using the list encoding (duplicating bits) in products would have the same problem. I think it would work if products change encoding to have the first projection length-prefixed (for example, duplicate bits to encode the length and then just encode the actual projection without duplication). Then an iterated product will not explode in size.
Edited by Jakob Botsch NielsenSo, I guess the best way forward is that I only include the
namespace
part in this MR and @jakobbotsch makes another MR for the new list encoding?Following up on that, @jakobbotsch if you like, you could already make the MR, and just leave namespaces broken. Once this lands, you can rebase.
Done. !62 (merged)
Edited by Jakob Botsch Nielsenmentioned in merge request !62 (merged)
!62 (merged) subsumes this MR. Closing.