mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2026-02-04 06:37:06 +07:00
Compare commits
6 Commits
e9824a4776
...
8d88d55267
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d88d55267 | ||
|
|
b774abf63c | ||
|
|
4a018f4c40 | ||
|
|
39c20f13dd | ||
|
|
ce864b7433 | ||
|
|
04c9e4aaeb |
@@ -63,6 +63,7 @@
|
||||
- [Chunk](#chunk)
|
||||
- [Builder](#builder)
|
||||
- [Changelog](#changelog)
|
||||
- [vX.Y.Z](#vxyz)
|
||||
- [v1.8.0](#v180)
|
||||
- [v1.7.0](#v170)
|
||||
- [v1.6.0](#v160)
|
||||
@@ -1565,6 +1566,10 @@ builder_mt:destruction_policy :: id -> builder
|
||||
|
||||
## Changelog
|
||||
|
||||
### vX.Y.Z
|
||||
|
||||
- Performance improvements of the [`evolved.destroy`](#evolveddestroy) and [`evolved.batch_destroy`](#evolvedbatch_destroy) functions
|
||||
|
||||
### v1.8.0
|
||||
|
||||
- Added the new [`evolved.REALLOC`](#evolvedrealloc) and [`evolved.COMPMOVE`](#evolvedcompmove) fragment traits that allow customizing component storages
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
- observers and events
|
||||
- add INDEX fragment trait
|
||||
- use compact prefix-tree for chunks
|
||||
- optional ffi component storages
|
||||
|
||||
## Thoughts
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ require 'develop.testing.system_as_query_tests'
|
||||
|
||||
require 'develop.benchmarks.clone_bmarks'
|
||||
require 'develop.benchmarks.common_bmarks'
|
||||
require 'develop.benchmarks.destroy_bmarks'
|
||||
require 'develop.benchmarks.migration_bmarks'
|
||||
require 'develop.benchmarks.process_bmarks'
|
||||
require 'develop.benchmarks.spawn_bmarks'
|
||||
|
||||
56
develop/benchmarks/destroy_bmarks.lua
Normal file
56
develop/benchmarks/destroy_bmarks.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
local evo = require 'evolved'
|
||||
local basics = require 'develop.basics'
|
||||
|
||||
evo.debug_mode(false)
|
||||
|
||||
local N = 1000
|
||||
|
||||
print '----------------------------------------'
|
||||
|
||||
basics.describe_bench(string.format('Destroy Benchmarks: Acquire and Release %d ids', N),
|
||||
function(tables)
|
||||
local id = evo.id
|
||||
local destroy = evo.destroy
|
||||
|
||||
for i = 1, N do
|
||||
tables[i] = id()
|
||||
end
|
||||
|
||||
for i = 1, N do
|
||||
destroy(tables[i])
|
||||
end
|
||||
end, function()
|
||||
return {}
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Destroy Benchmarks: Acquire and Release %d double ids', N),
|
||||
function(tables)
|
||||
local id = evo.id
|
||||
local destroy = evo.destroy
|
||||
|
||||
for i = 1, N, 2 do
|
||||
tables[i], tables[i + 1] = id(2)
|
||||
end
|
||||
|
||||
for i = 1, N, 2 do
|
||||
destroy(tables[i], tables[i + 1])
|
||||
end
|
||||
end, function()
|
||||
return {}
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Destroy Benchmarks: Acquire and Release %d triple ids', N),
|
||||
function(tables)
|
||||
local id = evo.id
|
||||
local destroy = evo.destroy
|
||||
|
||||
for i = 1, N, 3 do
|
||||
tables[i], tables[i + 1], tables[i + 2] = id(3)
|
||||
end
|
||||
|
||||
for i = 1, N, 3 do
|
||||
destroy(tables[i], tables[i + 1], tables[i + 2])
|
||||
end
|
||||
end, function()
|
||||
return {}
|
||||
end)
|
||||
652
evolved.lua
652
evolved.lua
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user