Finish verdigris for now

This commit is contained in:
2026-10-22 20:07:00 -03:00
parent 4cd29a17b3
commit 31ae2973d7
14 changed files with 165 additions and 34 deletions
+8 -9
View File
@@ -1,15 +1,14 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// how long verdigris takes on a stone floor, see "Performance" in REDSTONE.md, and how many set_block messages a
// player watching would get: placing a 1000 wire zigzag one wire at a time, a lever switching it, a block placed and
// taken away beside it while it's powered, a wire broken out of its middle and put back, a lever switching a 64×64
// grid, and a lever switching a tower of 50 torches. with the net index a wire took 0.5 ms to place however big its
// net, a block beside the powered zigzag 0.1 ms and no wire messages, and switching took 15 to 20 ms for the zigzag and
// 50 to 60 ms for the grid, about 15 µs a wire. walking the net on every change, a wire took 30 ms to place in the
// zigzag and 400 ms in the grid, a block beside 20 ms, and switching 35 to 45 ms and 135 ms. the tower's 50 torches
// changing over 102 ticks took about 3 ms more than the ticks did with nothing switched. repeater clocks come with
// repeaters
// how long verdigris takes on a stone floor, and how many set_block messages a player watching would get: placing a
// 1000 wire zigzag one wire at a time, a lever switching it, a block placed and taken away beside it while it's
// powered, a wire broken out of its middle and put back, a lever switching a 64×64 grid, and a lever switching a tower
// of 50 torches. with the net index a wire took 0.5 ms to place however big its net, a block beside the powered zigzag
// 0.1 ms and no wire messages, and switching took 15 to 20 ms for the zigzag and 50 to 60 ms for the grid, about 15 µs
// a wire. walking the net on every change, a wire took 30 ms to place in the zigzag and 400 ms in the grid, a block
// beside 20 ms, and switching 35 to 45 ms and 135 ms. the tower's 50 torches changing over 102 ticks took about 3 ms
// more than the ticks did with nothing switched. repeater clocks come with repeaters
// deno run -A tools/verdigris_bench.ts
import type { Face } from "../common/mod_api/shared.ts";
import { AIR_ID } from "../common/protocol.ts";