Comments (3)
I think caching would double the leak when you have many instances and not just repeatedly calling String()
on a single instance.
from go-version.
I think the main problem is Compare
doing v.String() == other.String()
I wonder if it would be more efficient if instead of segments []int64
there would be something like:
segment1 int64
segment2 int64
segment3 int64
segment4 int64
segment5 int64
segment6 int64
lenSegments int
then equality could be compared with v == other
.
This would of course put a limit to how many segments you can have.
from go-version.
Actually, ARRAYS of comparable types are comparable. There could therefore be:
segments [maxSegments]int64
numSegments int
The struct would still be comparable with ==
.
from go-version.
Related Issues (20)
- Incorrect hanling of prerelease in constraints HOT 4
- Prerelease String shouldn't always be treated as lower version
- Invalid semver versions are treated as "valid" HOT 1
- Version `v1.0.2-alpha.0` should be greater than `v1.0.1` but `version.NewConstraint(...).Check` returns false HOT 1
- When i compare with Empty version string Getting Error
- Must() method for Constraint
- Incorrectly evaluates contraints involving prereleases
- Malformed version for linux kernel HOT 2
- Comparing alpine packages versions
- Prerelease bug hidden due to bad tests HOT 1
- panic when version is empty string HOT 2
- [Bug] Cant pars pereleased git version HOT 2
- Incorrectly says some inputs are semver
- Double-digit prerelease sorting broken HOT 1
- Leading zeros are explicitly forbidden in Semantic Versioning HOT 2
- [question] which is bigger according the constraint? HOT 1
- Support json marshaling/unmarshaling
- Proposal: Add version diff
- Skipping some versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-version.