mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-22 19:12:05 -08:00
fix #1387
Instead of building a new serialized message for each recipient, try to cache them.
This commit is contained in:
parent
f04648e081
commit
ec15d367ba
6 changed files with 249 additions and 20 deletions
|
|
@ -80,4 +80,14 @@ func TestSets(t *testing.T) {
|
|||
if !BitsetGet(t3s, 0) || BitsetGet(t3s, 72) || !BitsetGet(t3s, 74) || BitsetGet(t3s, 71) {
|
||||
t.Error("subtract doesn't work")
|
||||
}
|
||||
|
||||
var tlocal testBitset
|
||||
tlocals := tlocal[:]
|
||||
BitsetCopyLocal(tlocals, t1s)
|
||||
for i = 0; i < 128; i++ {
|
||||
expected := (i != 72)
|
||||
if BitsetGetLocal(tlocals, i) != expected {
|
||||
t.Error("all bits should be set except 72")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue