WEBVTT

00:00:00.500 --> 00:00:03.651
This benchmark canister puts the same hundred thousand entries

00:00:03.664 --> 00:00:04.653
in three maps.

00:00:05.554 --> 00:00:09.512
Tables holds a native Nyxus map and a Minima frozen hash descriptor.

00:00:10.410 --> 00:00:12.963
Its baseline child holds the Hylix map.

00:00:13.861 --> 00:00:15.567
Every stored key is even.

00:00:16.465 --> 00:00:19.525
We'll look up fifteen thousand eight hundred and seventy-four,

00:00:19.812 --> 00:00:21.439
then the odd key that follows it.

00:00:22.338 --> 00:00:23.887
The first key has a value.

00:00:24.785 --> 00:00:26.101
The second is absent.

00:00:28.233 --> 00:00:31.774
Nyxus compares the key with entries in native B-tree nodes.

00:00:32.675 --> 00:00:35.696
Each comparison can settle the search or tell it which child

00:00:35.709 --> 00:00:36.268
to follow.

00:00:37.167 --> 00:00:39.589
The even key finds its value in the tree.

00:00:40.487 --> 00:00:42.610
The odd key runs out of places to look.

00:00:43.508 --> 00:00:45.878
Hylix also searches ordered keys.

00:00:46.776 --> 00:00:49.888
Its child links name blocks in its virtual stable image.

00:00:50.787 --> 00:00:53.013
It reads their bytes through the working set.

00:00:53.912 --> 00:00:56.294
The even key finds a value to decode.

00:00:57.193 --> 00:00:58.729
The odd key comes back empty.

00:01:00.867 --> 00:01:04.265
The frozen hash map hashes the key to choose a primary bucket.

00:01:05.165 --> 00:01:08.655
It reads the whole four-kibibyte bucket into borrowed workspace.

00:01:09.554 --> 00:01:11.559
This bucket holds our even key.

00:01:12.457 --> 00:01:15.270
The map decodes the matching value and returns it.

00:01:16.168 --> 00:01:19.814
The absent key fails the exact comparison in its primary bucket.

00:01:20.712 --> 00:01:24.163
The map tries a backup bucket, using the same workspace.

00:01:25.061 --> 00:01:28.460
The second check also misses, so the lookup returns none.

00:01:30.600 --> 00:01:33.295
Give the Nyxus map a replacement for the even key.

00:01:34.195 --> 00:01:37.776
The native map writes the new Rust value into the existing entry.

00:01:38.675 --> 00:01:40.406
Hylix can edit through a guard.

00:01:41.305 --> 00:01:43.622
It decodes the value for this write frame.

00:01:44.521 --> 00:01:47.750
When the guard drops, it encodes the replacement back into the

00:01:47.763 --> 00:01:48.740
original slot.

00:01:49.638 --> 00:01:51.826
The frame then flushes the changed bytes.

00:01:53.967 --> 00:01:56.779
Look up the same key in the benchmark's frozen map.

00:01:57.680 --> 00:01:59.802
It still returns the original value.

00:02:00.700 --> 00:02:04.177
The benchmark builds this index once from the starting entries.

00:02:05.075 --> 00:02:08.487
To revise a frozen map, build a new index from the full entry

00:02:08.500 --> 00:02:10.388
list with that one value changed.

00:02:11.286 --> 00:02:14.867
Once the build succeeds, the owner replaces the old index.

00:02:15.765 --> 00:02:18.239
The next lookup returns the revised value.

00:02:19.138 --> 00:02:22.367
The native tree and the retained descriptors sit in main memory.

00:02:23.265 --> 00:02:26.560
The Hylix nodes and the frozen buckets sit in stable memory.

00:02:27.458 --> 00:02:30.245
What happens to the retained heap when the canister installs

00:02:30.258 --> 00:02:30.987
new code?

