add comment about copy_queue (non-)usage

This commit is contained in:
tali 2023-04-16 16:37:28 -04:00
parent 04dddcdaa8
commit cf9fd27ca0
1 changed files with 3 additions and 0 deletions

View File

@ -121,6 +121,9 @@ impl Node {
Node::alloc( Node::alloc(
arena, arena,
copy_matrix(arena, &matrix), copy_matrix(arena, &matrix),
// optimization: copy_queue() not necessary! self.queue is already
// allocated on the arena, and this queue just aliases pointers
// into self.queue.next
queue, queue,
evaluate(&matrix, queue), evaluate(&matrix, queue),
Some(Edge { Some(Edge {