mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
optimization: BlockAllocator: Actually allocate in blocks
Instead of hitting the heap for each and every call to Create() Significantly improves performance for heavy loads. Slight performance loss for lighter loads. A: base.bench B: new.bench Test name | Δ (A → B) | % (A → B) --------------------------------------+--------------+----------- GenerateSPIRV/"simple_fragment.wgsl" | 27.021µs | +6.4% GenerateMSL/"simple_compute.wgsl" | 35.592µs | +6.1% GenerateMSL/"simple_vertex.wgsl" | 37.64µs | +5.5% GenerateHLSL/"simple_fragment.wgsl" | 42.145µs | +5.2% GenerateGLSL/"simple_fragment.wgsl" | 31.506µs | +4.9% GenerateHLSL/"simple_vertex.wgsl" | 38.843µs | +4.7% GenerateMSL/"simple_fragment.wgsl" | 29.977µs | +4.5% GenerateSPIRV/"simple_vertex.wgsl" | 19.882µs | +4.2% GenerateGLSL/"simple_vertex.wgsl" | 24.702µs | +3.7% GenerateSPIRV/"simple_compute.wgsl" | 17.652µs | +3.2% GenerateHLSL/"simple_compute.wgsl" | 26.826µs | +2.7% GenerateGLSL/"simple_compute.wgsl" | 11.952µs | +1.8% ParseWGSL/"particles.wgsl" | -104.83µs | -4.2% GenerateMSL/"particles.wgsl" | -1.079243ms | -9.4% GenerateSPIRV/"particles.wgsl" | -1.012483ms | -9.4% GenerateGLSL/"particles.wgsl" | -3.522106ms | -9.5% GenerateHLSL/"particles.wgsl" | -1.849666ms | -10.6% Issue: tint:1383 Change-Id: Ib691328538c597c06a75dfba392c99d2afbd5442 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/76961 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
73ced33dfb
commit
ba1a8f8d05
@@ -73,11 +73,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
ASSERT_EQ(tint::Program::printer(&src), tint::Program::printer(&dst));
|
||||
|
||||
// Check that none of the AST nodes or type pointers in dst are found in src
|
||||
std::unordered_set<tint::ast::Node*> src_nodes;
|
||||
std::unordered_set<const tint::ast::Node*> src_nodes;
|
||||
for (auto* src_node : src.ASTNodes().Objects()) {
|
||||
src_nodes.emplace(src_node);
|
||||
}
|
||||
std::unordered_set<tint::sem::Type*> src_types;
|
||||
std::unordered_set<const tint::sem::Type*> src_types;
|
||||
for (auto* src_type : src.Types()) {
|
||||
src_types.emplace(src_type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user