• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / arche / 12455509985

22 Dec 2024 03:28PM CUT coverage: 100.0%. Remained the same
12455509985

push

github

web-flow
Deprecate slow methods like `World.Assign` and `World.NewEntityWith` (#441)

The fix in #438 slows these methods down due to more use of reflection. However, their generic counterparts were optimized in #440 to not use any reflection.

Thus, we deprecate the slow, non-generic methods.

* deprecate slow methods Assign and NewEntityWith
* ignore deprecated Assign in generic query tests
* add deprecation node to benchmarks in user guide
* update CHANGELOG

6411 of 6411 relevant lines covered (100.0%)

115483.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/ecs/bitmask_common.go
1
package ecs
2

3
const wordSize = 64
4

5
// Matches the mask as filter against another mask.
6
func (b Mask) Matches(bits *Mask) bool {
81,554✔
7
        return bits.Contains(&b)
81,554✔
8
}
81,554✔
9

10
// Without creates a [MaskFilter] which filters for including the mask's components,
11
// and excludes the components given as arguments.
12
func (b Mask) Without(comps ...ID) MaskFilter {
7✔
13
        return MaskFilter{
7✔
14
                Include: b,
7✔
15
                Exclude: All(comps...),
7✔
16
        }
7✔
17
}
7✔
18

19
// Exclusive creates a [MaskFilter] which filters for exactly the mask's components.
20
// Matches only entities that have exactly the given components, and no other.
21
func (b Mask) Exclusive() MaskFilter {
8✔
22
        return MaskFilter{
8✔
23
                Include: b,
8✔
24
                Exclude: b.Not(),
8✔
25
        }
8✔
26
}
8✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc