タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

algorithmとrustに関するkomlowのブックマーク (2)

  • Suffix ArrayをRustで実装した - Islands in the byte stream

    suffix arrayを一番簡単なアルゴリズムで実装する - アルゴリズム学習(その6) - $shibayu36->blog; を読んで、ちょうど自分も何らかの形で全文検索を一部実装してみようと思っていたのでRustで真似してみました。 Rustを選んだ理由は、以下の理由からです。 実際に全文検索を実装するのに耐えうるパフォーマンスであること パッケージマネージャなどのエコシステムが完備されていること Rustについてはそれほど詳しくはないのですが、GCや例外がないとのこと。であればパフォーマンスチューニングがC言語並にやりやすい可能性がありますし、一度真面目に勉強してみたいと思っていました。Goと異なり、ジェネリクスがあるのも魅力的です。 というわけでコードこんな感じになりました: pub fn make_suffix_array(s: &str) -> Vec<i64> { use

    Suffix ArrayをRustで実装した - Islands in the byte stream
  • Rust Collections Case Study: BTreeMap

    Rust Collections Case Study: BTreeMap Alexis Beingessner This is the third entry in a series on implementing collections in the Rust programming language. The full list of entries can be found here. In my previous two posts I talked a lot about some high-level patterns and issues that make implementing collections in Rust an interesting problem. Today I'd like to really dig into one of my two favo

  • 1