Rust 027 Entry API - 効率的な更新 episode artwork

EPISODE · May 9, 2026 · 12 MIN

Rust 027 Entry API - 効率的な更新

from 聞き流しプログラミング言語学習 · host ますたーさん

第27章へようこそ。今日のテーマはEntry APIです。前章ではHashMapの内部構造と基本操作を扱いました。キーをハッシュ関数に通して整数を得て、その整数からテーブル上の位置を決め、スロットを確認してあたいを取り出す。挿入、取得、削除、存在確認、いずれも内部ではハッシュ計算とテーブル探索を組み合わせて動きます。今日扱うのは、この基本操作だけでは無駄が出てしまう典型的な場面と、その無駄を解消するために用意された別の操作です。「キーが存在していたら既存の値を変更する。存在していなければ新しいあたいを挿入する」という処理を、HashMapに対してどう書くか。素朴に書くと、同じキーに対するハッシュ計算と探索が複数回走ってしまう。これを1回で済ませるための仕組みがEntry APIです。今日はEntry APIが解決している問題、Entryという型の構造、or_insert、or_insert_with、and_modifyの動作、そしてEntry APIが借用とどう関わっているかを扱います。

Episode metadata supplied by the publisher feed · Published May 9, 2026

Embed this episode

NOW PLAYING

Rust 027 Entry API - 効率的な更新

0:00 12:49

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of 聞き流しプログラミング言語学習?

This episode is 12 minutes long.

When was this 聞き流しプログラミング言語学習 episode published?

This episode was published on May 9, 2026.

Can I download this 聞き流しプログラミング言語学習 episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!