Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++版の高速化 #27

Merged
merged 5 commits into from
Jul 31, 2022
Merged

C++版の高速化 #27

merged 5 commits into from
Jul 31, 2022

Conversation

wx257osn2
Copy link
Contributor

@wx257osn2 wx257osn2 commented Jul 24, 2022

  • 細かい修正
    • martinus/robin-hood-hashingはもう更新されてないっぽいので後継のmartinus/unordered_denseに更新
    • 1文字の出力に文字列リテラルではなく文字リテラルを使用するように
    • std::greater<Visit>std::greater<>
      • std::greater<> は任意の型を取っていい感じに処理してくれるやつです
    • 行末のゴミを除去する処理を std::string 上ではなく std::string_view 上で行うように
  • 高速化: 入力のパースからループを除去
    • 手元の環境で30ms程度高速化

@wx257osn2 wx257osn2 changed the title C++版の微更新 C++版の高速化 Jul 25, 2022
@reki2000 reki2000 merged commit db6a346 into reki2000:master Jul 31, 2022
@wx257osn2 wx257osn2 deleted the improve-cpp branch July 31, 2022 09:09
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