homalg-project / CategoricalTowers

Towers of category constructors
GNU General Public License v2.0
6 stars 4 forks source link

Speed up SecondPageOfCohomologicalSpectralSequence.g #542

Open zickgraf opened 4 months ago

zickgraf commented 4 months ago

by compiling AdditiveClosure( QuotientCategory( LinearClosure ) )

@mohamed-barakat A few things:

  1. Currently, I load the compiled code manually in the example file because there are so many different versions of QuotientCategory that I am not sure for which versions the compiled code is actually valid. For loading it automatically, you can set the compiler hint precompiled_towers (see e.g. https://github.com/homalg-project/Algebroids/blob/277ef58afcc40ecf01d9dda51331b3f89b7f19be/gap/Algebroids.gi#L1193) in the category constructor for which the compiled code is valid.
  2. Please review the type signatures. Due to missing documentation this was a bit of guesswork.
  3. There still is a warning about a missing type declaration, which does however not affect the compiled code (the tree cannot be typed anyway due to using Position, see the next point).
  4. The runtime is improved by a factor > 10, but still is about 45 seconds on my laptop. I think more could be gained by improving/refactoring https://github.com/homalg-project/Algebroids/blob/277ef58afcc40ecf01d9dda51331b3f89b7f19be/gap/QuotientsOfLinearClosuresOfPathCategories.gi#L117. The filename QuotientsOfLinearClosuresOfPathCategories sounds very specific, I guess one approach could be to first make this case more generic.
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.09%. Comparing base (b313f3b) to head (4bb1088).

Files Patch % Lines
...LinearClosuresOfPathCategoriesAndTheirQuotients.gd 60.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #542 +/- ## ======================================= Coverage 76.09% 76.09% ======================================= Files 389 389 Lines 58034 58044 +10 ======================================= + Hits 44161 44169 +8 - Misses 13873 13875 +2 ``` | [Flag](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | Coverage Δ | | |---|---|---| | [Algebroids](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `76.05% <80.00%> (-0.01%)` | :arrow_down: | | [CatReps](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `83.54% <ø> (ø)` | | | [CategoriesWithAmbientObjects](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `89.28% <ø> (ø)` | | | [ExteriorPowersCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `43.70% <ø> (ø)` | | | [FiniteCocompletions](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `92.69% <ø> (ø)` | | | [FpCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `88.43% <ø> (ø)` | | | [FunctorCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `65.40% <ø> (ø)` | | | [GradedCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `86.57% <ø> (ø)` | | | [InternalModules](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `81.66% <ø> (ø)` | | | [IntrinsicCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `82.55% <ø> (ø)` | | | [IntrinsicGradedModules](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `50.83% <ø> (ø)` | | | [IntrinsicModules](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `82.15% <ø> (ø)` | | | [LazyCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `68.38% <ø> (ø)` | | | [Locales](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `86.00% <ø> (ø)` | | | [PreSheaves](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `91.92% <ø> (ø)` | | | [QuotientCategories](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `92.15% <100.00%> (+0.06%)` | :arrow_up: | | [SubcategoriesForCAP](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `81.25% <ø> (ø)` | | | [ToolsForCategoricalTowers](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `84.93% <ø> (ø)` | | | [Toposes](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `90.86% <ø> (ø)` | | | [ZariskiFrames](https://app.codecov.io/gh/homalg-project/CategoricalTowers/pull/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project) | `74.31% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=homalg-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.