Skip to content

Commit 8d88d55

Browse files
committed
Merge branch 'feature/id_opts' into dev
2 parents e9824a4 + b774abf commit 8d88d55

5 files changed

Lines changed: 483 additions & 194 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
- [Chunk](#chunk)
6464
- [Builder](#builder)
6565
- [Changelog](#changelog)
66+
- [vX.Y.Z](#vxyz)
6667
- [v1.8.0](#v180)
6768
- [v1.7.0](#v170)
6869
- [v1.6.0](#v160)
@@ -1565,6 +1566,10 @@ builder_mt:destruction_policy :: id -> builder
15651566

15661567
## Changelog
15671568

1569+
### vX.Y.Z
1570+
1571+
- Performance improvements of the [`evolved.destroy`](#evolveddestroy) and [`evolved.batch_destroy`](#evolvedbatch_destroy) functions
1572+
15681573
### v1.8.0
15691574

15701575
- Added the new [`evolved.REALLOC`](#evolvedrealloc) and [`evolved.COMPMOVE`](#evolvedcompmove) fragment traits that allow customizing component storages

develop/ROADMAP.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
- observers and events
66
- add INDEX fragment trait
77
- use compact prefix-tree for chunks
8-
- optional ffi component storages
98

109
## Thoughts
1110

develop/all.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ require 'develop.testing.system_as_query_tests'
1616

1717
require 'develop.benchmarks.clone_bmarks'
1818
require 'develop.benchmarks.common_bmarks'
19+
require 'develop.benchmarks.destroy_bmarks'
1920
require 'develop.benchmarks.migration_bmarks'
2021
require 'develop.benchmarks.process_bmarks'
2122
require 'develop.benchmarks.spawn_bmarks'
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
local evo = require 'evolved'
2+
local basics = require 'develop.basics'
3+
4+
evo.debug_mode(false)
5+
6+
local N = 1000
7+
8+
print '----------------------------------------'
9+
10+
basics.describe_bench(string.format('Destroy Benchmarks: Acquire and Release %d ids', N),
11+
function(tables)
12+
local id = evo.id
13+
local destroy = evo.destroy
14+
15+
for i = 1, N do
16+
tables[i] = id()
17+
end
18+
19+
for i = 1, N do
20+
destroy(tables[i])
21+
end
22+
end, function()
23+
return {}
24+
end)
25+
26+
basics.describe_bench(string.format('Destroy Benchmarks: Acquire and Release %d double ids', N),
27+
function(tables)
28+
local id = evo.id
29+
local destroy = evo.destroy
30+
31+
for i = 1, N, 2 do
32+
tables[i], tables[i + 1] = id(2)
33+
end
34+
35+
for i = 1, N, 2 do
36+
destroy(tables[i], tables[i + 1])
37+
end
38+
end, function()
39+
return {}
40+
end)
41+
42+
basics.describe_bench(string.format('Destroy Benchmarks: Acquire and Release %d triple ids', N),
43+
function(tables)
44+
local id = evo.id
45+
local destroy = evo.destroy
46+
47+
for i = 1, N, 3 do
48+
tables[i], tables[i + 1], tables[i + 2] = id(3)
49+
end
50+
51+
for i = 1, N, 3 do
52+
destroy(tables[i], tables[i + 1], tables[i + 2])
53+
end
54+
end, function()
55+
return {}
56+
end)

0 commit comments

Comments
 (0)