Skip to content

perf: compact normal form of CommAlgebra baseChange#1314

Open
plt-amy wants to merge 1 commit into
agda:masterfrom
plt-amy:aliao/oncoprod-perf
Open

perf: compact normal form of CommAlgebra baseChange#1314
plt-amy wants to merge 1 commit into
agda:masterfrom
plt-amy:aliao/oncoprod-perf

Conversation

@plt-amy

@plt-amy plt-amy commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The module ….FreeCommAlgebra.OnCoproduct spends almost 10s conversion-checking the reduct of R[I][J], incl. 7s doing this in the definition of from' alone. My surgical {-# INLINE #-} pragma placement cuts the total runtime of checking OnCoproduct to less than a second.

Before:

Checking Cubical.Algebra.CommAlgebra.AsModule.FreeCommAlgebra.OnCoproduct (...).
Total                                  12,522ms           
Miscellaneous                              14ms           
Typing                                      0ms (11,565ms)
Typing.CheckRHS                        10,325ms           
Typing.TypeSig                            934ms           
Typing.Generalize                         199ms           
Deserialization                           787ms           

After:

Checking Cubical.Algebra.CommAlgebra.AsModule.FreeCommAlgebra.OnCoproduct (...).
Total                                  1,569ms        
Miscellaneous                             14ms        
Deserialization                          783ms        
Typing                                     0ms (687ms)
Typing.CheckRHS                          562ms        
Typing.TypeSig                            53ms        
Typing.Generalize                         18ms        

The module ….FreeCommAlgebra.OnCoproduct spends almost 10s
conversion-checking the reduct of R[I][J], incl. 7s doing this in the
definition of from' alone.

Surgical {-# INLINE #-} pragma placement cuts the total runtime of
checking OnCoproduct to less than a second.
@plt-amy plt-amy force-pushed the aliao/oncoprod-perf branch from cc72419 to 83879b5 Compare June 19, 2026 20:39
@plt-amy plt-amy changed the title perf: compact normal form of baseChange perf: compact normal form of CommAlgebra baseChange Jun 19, 2026
@plt-amy

plt-amy commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

I just remembered that I had copy-pasted the old normal form into a gist but forgot to actually share. I recommend safety glasses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant