{"id":901,"date":"2015-06-09T07:27:04","date_gmt":"2015-06-09T06:27:04","guid":{"rendered":"http:\/\/www.floyd.ch\/?p=901"},"modified":"2022-02-09T11:19:27","modified_gmt":"2022-02-09T10:19:27","slug":"python-difflib-sequencematcher-quick_ratio-performance-contribution","status":"publish","type":"post","link":"https:\/\/www.floyd.ch\/?p=901","title":{"rendered":"Python difflib SequenceMatcher quick_ratio performance contribution"},"content":{"rendered":"<p>Hi everyone<\/p>\n<p>Once in a while I&#8217;m trying to contribute something non-security related to an Open Source project. At the moment I&#8217;m teaching Python courses and found some of my old scripts that are pretty useful. I&#8217;m trying to contribute a performance optimized difflib.SequenceMatcher.quick_ratio to CPython. It&#8217;s not decided yet if it&#8217;s going to be in the stdlib or just a Python code recipe (maybe referenced in the docs). My implementation isn&#8217;t perfect yet, as soon as there is a decision I would further work on it. If you code in Python and you have used <a href=\"https:\/\/docs.python.org\/2\/library\/difflib.html#difflib.SequenceMatcher.quick_ratio\" target=\"_blank\" rel=\"noopener\">difflib.SequenceMatcher.quick_ratio<\/a>, I&#8217;d be happy if you join the discussion on the <a href=\"https:\/\/code.activestate.com:443\/lists\/python-ideas\/33930\" target=\"_blank\" rel=\"noopener\">Python-Ideas mailing list<\/a> or on the <a href=\"https:\/\/bugs.python.org\/issue24384\" target=\"_blank\" rel=\"noopener\">Python issue tracker<\/a>. We need some more opinions at the moment.<\/p>\n<p>cheers,<br \/>\nfloyd<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone Once in a while I&#8217;m trying to contribute something non-security related to an Open Source project. At the moment I&#8217;m teaching Python courses and found some of my old scripts that are pretty useful. I&#8217;m trying to contribute &hellip; <a href=\"https:\/\/www.floyd.ch\/?p=901\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[153,156,155,20,157,154],"class_list":["post-901","post","type-post","status-publish","format-standard","hentry","category-coding","tag-difflib","tag-optimisation","tag-performance","tag-python","tag-quick_ratio","tag-sequencematcher"],"_links":{"self":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=901"}],"version-history":[{"count":9,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/901\/revisions"}],"predecessor-version":[{"id":1277,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/901\/revisions\/1277"}],"wp:attachment":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}