tag:blogger.com,1999:blog-3971202189709462152.post3877859053629057968..comments2024-03-11T12:50:02.036+01:00Comments on PyPy Status Blog: A JIT for Regular Expression MatchingCarl Friedrich Bolz-Tereickhttp://www.blogger.com/profile/00518922641059511014noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-3971202189709462152.post-87177166051017510712013-01-12T23:40:33.418+01:002013-01-12T23:40:33.418+01:00The code has been merged to PyPy since I think. Lo...The code has been merged to PyPy since I think. Look up cfbolz repos on bitbucket thoughMaciej Fijalkowskihttps://www.blogger.com/profile/11410841070239382771noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-36370817539934366022013-01-12T22:25:24.702+01:002013-01-12T22:25:24.702+01:00I'm not able to access the code on codespeak.n...I'm not able to access the code on codespeak.net. Has the code been moved to some other place?Nikhilhttps://www.blogger.com/profile/13115525929963943541noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-34894641676260079862013-01-12T22:24:34.718+01:002013-01-12T22:24:34.718+01:00This comment has been removed by the author.Nikhilhttps://www.blogger.com/profile/13115525929963943541noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-84190516372894990892010-08-02T09:52:05.279+02:002010-08-02T09:52:05.279+02:00We can't possibly include all regex engines (e...We can't possibly include all regex engines (even if we would like to). However, sources are out there and you can always rerun those benchmarks and see how it compares :-)<br /><br />Cheers,<br />fijalMaciej Fijalkowskihttps://www.blogger.com/profile/11410841070239382771noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-55234966396791860162010-08-02T01:19:02.924+02:002010-08-02T01:19:02.924+02:00boost::regex is not mentioned. It's got both r...boost::regex is not mentioned. It's got both recursive and non-recursive implementations. And it is the base of the standard C++ TR1 regex. Would be interesting to stack it up against other results because it isMaxim Yegorushkinhttps://www.blogger.com/profile/13335665761944189051noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-77590462436929846962010-06-10T11:51:44.758+02:002010-06-10T11:51:44.758+02:00@jabapyth: there is no test runner code. I am simp...@jabapyth: there is no test runner code. I am simply running something like<br /><br />genrandom 20 1000000 | time regex-c<br /><br />What performance results are you getting? Are you sure that you translated jitregex.py with -Ojit? Otherwise the JIT is not put into the executable.Carl Friedrich Bolz-Tereickhttps://www.blogger.com/profile/00518922641059511014noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-67397343103478947532010-06-09T22:27:21.614+02:002010-06-09T22:27:21.614+02:00Could you post your 'test runner' code? I&...Could you post your 'test runner' code? I'm running some tests (with your) code and getting drastically different numbers...Jared Forsythhttps://www.blogger.com/profile/15235563645979524582noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-45731598381519130182010-06-08T23:55:24.029+02:002010-06-08T23:55:24.029+02:00Would it be possible to create a pypy or cpython e...Would it be possible to create a pypy or cpython extension module this way?Kumohttps://www.blogger.com/profile/06327448754980240167noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-53116939522847258362010-06-08T17:40:26.080+02:002010-06-08T17:40:26.080+02:00@Nelson: If you don't change the "and&quo...@Nelson: If you don't change the "and" and "or" you get a lot of assembler code generated, and it's not particularly fast.<br /><br />Note that this "and" and "or" business is quite specific to this particular example. Usually you can work more incrementally by generating a JIT, then looking at the produced assembler and then doing some small changes in the interpreter to improve parts of it. Each such change is usually localized to one part of the interpreter improves the performance of some language feature.<br /><br />This example is not really large enough to show this way of working, though :-). Maybe at some point I should write a walk-through for some interpreter.Carl Friedrich Bolz-Tereickhttps://www.blogger.com/profile/00518922641059511014noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-7682457258328464802010-06-08T16:36:09.796+02:002010-06-08T16:36:09.796+02:00What happens if you don't replace and and or?
...What happens if you don't replace <b>and</b> and <b>or</b>?<br /><br />Without those changes, the modifications for JIT really are prety small --<br />mostly just some annotations in the main loop and at toplevel for each<br />class. With those changes, though, you need to potentially check the entire<br />codebase of your interpreter.<br /><br />Pretty fun performance results, though.Nelson Elhagehttps://www.blogger.com/profile/09577173102450930911noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-52167287738851943692010-06-08T14:35:57.483+02:002010-06-08T14:35:57.483+02:00@Armin: Damn, you're right. I fixed the blog p...@Armin: Damn, you're right. I fixed the blog post.Carl Friedrich Bolz-Tereickhttps://www.blogger.com/profile/00518922641059511014noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-71486824356710015792010-06-08T14:11:17.086+02:002010-06-08T14:11:17.086+02:00Warning: the first example is wrong: there should ...Warning: the first example is wrong: there should be no code executed between can_enter_jit() and jit_merge_point(). In this case, there is the exit condition of the loop. It needs to be rewritten as a "while True:" loop with a "break" just before can_enter_jit().Armin Rigohttps://www.blogger.com/profile/06300515270104686574noreply@blogger.com