Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
正規表現の \z の話
Search
Kazuhiro NISHIYAMA
June 13, 2015
Programming
0
140
正規表現の \z の話
あるちょっと遅そうな正規表現を高速化した話
Kazuhiro NISHIYAMA
June 13, 2015
Tweet
Share
More Decks by Kazuhiro NISHIYAMA
See All by Kazuhiro NISHIYAMA
Ruby on Rails と私
znz
0
26
riscv64.rubyci.org internal
znz
0
21
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
68
devise-two-factorを4.xから5.xに上げた話
znz
0
340
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
84
Ubuntuのriscv64版をqemuで動かした
znz
0
100
lilo.linux.or.jpをbusterからbullseyeに上げた
znz
0
110
小規模個人アプリをRails 7.xにバージョンアップした話
znz
0
96
Ruby リファレンスマニュアル改善計画 2022 進捗報告
znz
0
150
Other Decks in Programming
See All in Programming
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
190
One Enishi After Another
snoozer05
PRO
0
150
技術的負債の正体を知って向き合う
irof
0
230
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
4.9k
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
440
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
600
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
630
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
890
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
360
Developer Joy - The New Paradigm
hollycummins
1
360
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
260
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Side Projects
sachag
455
43k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
930
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
Raft: Consensus for Rubyists
vanstee
140
7.2k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
How to Think Like a Performance Engineer
csswizardry
27
2.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
630
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
It's Worth the Effort
3n
187
28k
Transcript
正規表現の� � \z� の話 あるちょっと遅そうな正規表現を� � ⾼速化した話 Kazuhiro� NISHIYAMA 第67回�
Ruby関⻄� 勉強会 2015/06/13
自⼰紹介 twitter� や� github� では� @znz
Ruby� 関連 Ruby� (CRuby)� のコミッター Ruby� 関係でいろいろ るびま� (Rubyist� Magazine)�
とか http://magazine.rubyist.net/ るりま� (Ruby� リファレンスマニュア ル)� とか http://docs.ruby-lang.org/ja/ Ruby� 関連のイベントでの発表
とある正規表現 �������� 遅そう ⽂字列末尾以外にもマッチする
⽂字クラスを使う ������� 速くなった(ベンチマークは後で)
\z� を使う �������� �:� ⾏末にマッチ ��:� ⽂字列末尾のみにマッチ もっと速くなった
ベンチマーク ������������������� ��������������� ������������������� ��������������������� �������� ��������������������� ������������������������������������������������������ ������������������������������������������������������ ������������������������������������������������������
������������������������������������������������������ ���
ベンチマーク結果� (1) ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������ �������������������������������������������������������
������������������������������������������������������� ������������������������������������������������������� �������������������������������������������������������
ベンチマーク結果� (2) ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������� ������������������������������������������������������ �������������������������������������������������������
������������������������������������������������������� ������������������������������������������������������� �������������������������������������������������������
まとめ 1⽂字の場合は選択� (ん|ン)� では なく⽂字クラス� [んン]� を使おう ⽂字列末尾は� $� ではなく�
\z