Optimize algorithmic complexity and fix go vet warnings#578
Open
mattn wants to merge 7 commits intogorgonia:masterfrom
Open
Optimize algorithmic complexity and fix go vet warnings#578mattn wants to merge 7 commits intogorgonia:masterfrom
mattn wants to merge 7 commits intogorgonia:masterfrom
Conversation
- collections.go: Nodes.remove O(n²) → O(n) single-pass filter - collections.go: Nodes.Equals O(n²) → O(n) with map-based lookup - operations.go: containsDuplicate O(n²) → O(n) with seen-set - graph.go: pre-populate byID cache in addToAll to avoid linear fallback - compile.go: pre-size maps in newCodeGenerator with len(sorted) - blas.go: use sync.RWMutex for read-heavy WhichBLAS path - op_tensor.go: remove unreachable dead code after return - examples/stacked_autoencoder: use keyed fields in jpeg.Options
- actions/cache v2 → v4 (v2 has been shut down) - actions/checkout v2 → v4 - actions/setup-go v2 → v5 - codecov/codecov-action v1 → v4 - Replace deprecated set-output with GITHUB_OUTPUT
macos-latest now resolves to arm64 which does not support Go 1.15/1.16. Pin to macos-13 (last Intel runner) for amd64 builds.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #578 +/- ##
==========================================
+ Coverage 57.55% 60.18% +2.63%
==========================================
Files 77 77
Lines 13202 14915 +1713
==========================================
+ Hits 7598 8977 +1379
- Misses 4663 4980 +317
- Partials 941 958 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
macos-13 is deprecated and macos-latest is now arm64. Go 1.15/1.16 don't support darwin/arm64, so bump to 1.21/1.22.
vecf32 asm stubs are amd64-only, so avx/sse build tags fail on darwin/arm64. Restrict MacOS matrix to tag-less builds only.
Set ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=$(go env GOVERSION) for all test steps. Also bump coverage.yml Go version from 1.15 to 1.22.
go env GOVERSION returns go1.22.10 but the library expects go1.22. Use sed to strip the trailing .N patch version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve algorithmic complexity of hot-path graph operations (O(n²) → O(n) for
Nodes.remove,Nodes.Equals,containsDuplicate), pre-populate the node ID cache to eliminate linear fallback searches, pre-size maps in the code generator, and fixgo vetwarnings.Benchmark (benchstat)