Skip to content

solve: 3.Longest Substring Without Repeating Characters#48

Open
t9a-dev wants to merge 1 commit intomainfrom
3.Longest-Substring-Without-Repeating-Characters
Open

solve: 3.Longest Substring Without Repeating Characters#48
t9a-dev wants to merge 1 commit intomainfrom
3.Longest-Substring-Without-Repeating-Characters

Conversation

@t9a-dev
Copy link
Copy Markdown
Owner

@t9a-dev t9a-dev commented Jan 20, 2026

問題: 3. Longest Substring Without Repeating Characters
次に解く問題: 209. Minimum Size Subarray Sum
ファイルの構成: ./src/bin/<各ステップ>.rs

Comment thread src/bin/step1.rs
簡易的なベンチマークとの比較
手元の環境(Apple M4(10 cores))での簡易的なベンチマーク(デバッグビルド)は平均59.874msとなった。
秒あたり10億ステップの概算では230msとなったので、ベンチマーク結果と4倍程度の差となった。
見積もろうとしている計算時間のスケールを考えると、概算にしては良いところまで見積もれているように思った。
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一般論として、時間の見積もりは安全側に倒したいので(間に合わないと大きな問題だが、速すぎても大きな問題ではないことが多い)数倍くらい長めにでているくらいがちょうどいいだろうと思います。

あんまりにもぎりぎりそうだったら、「時間を測ってみたい」と感じることも大事です。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants