{"id":833,"date":"2012-12-23T19:49:42","date_gmt":"2012-12-23T15:49:42","guid":{"rendered":"http:\/\/seriyps.ru\/blog\/?p=833"},"modified":"2012-12-26T16:28:02","modified_gmt":"2012-12-26T12:28:02","slug":"benchmark-html-parserov","status":"publish","type":"post","link":"https:\/\/seriyps.com\/blog\/2012\/12\/23\/benchmark-html-parserov\/","title":{"rendered":"\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a HTML \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432"},"content":{"rendered":"<p>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u0443\u0441\u043e\u043a \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 Python \u043d\u0430 Erlang. \u0421\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e HTTP \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f CPU \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 HTML \u0432 DOM \u0434\u0435\u0440\u0435\u0432\u043e.<\/p>\n<p>\u0421\u043f\u0435\u0440\u0432\u0430 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c Erlang \u043f\u0430\u0440\u0441\u0435\u0440\u0430 mochiweb_html \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u0438\u0437 Python lxml.etree.HTML(). \u041f\u0440\u043e\u0432\u0435\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a, \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0441\u0434\u0435\u043b\u0430\u043b, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u0447\u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0435\u0449\u0451 \u043f\u0430\u0440\u043e\u0447\u043a\u0443-\u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c, \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u043f\u043e\u043a\u0440\u0430\u0441\u0438\u0432\u0435\u0435, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e.<br \/>\n\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0441\u043f\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u043d\u0430 <strong>Erlang<\/strong>, <strong>Python<\/strong>, <strong>PyPy<\/strong>, <strong>NodeJS<\/strong> \u0438 <strong>\u0421<\/strong> \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f\u0445:<\/p>\n<ul>\n<li>Erlang &#8211; mochiweb_html<\/li>\n<li>CPython &#8211; lxml.etree.HTML<\/li>\n<li>CPython &#8211; BeautifulSoup 3<\/li>\n<li>CPython &#8211; BeautifulSoup 4<\/li>\n<li>CPython &#8211; html5lib<\/li>\n<li>PyPy &#8211; BeautifulSoup 3<\/li>\n<li>PyPy &#8211; BeautifulSoup 4<\/li>\n<li>PyPy &#8211; html5lib<\/li>\n<li>Node.JS &#8211; cheerio<\/li>\n<li>Node.JS &#8211; htmlparser<\/li>\n<li>Node.JS &#8211; jsdom<\/li>\n<li>C &#8211; libxml2 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0438)<\/li>\n<\/ul>\n<p>\u0412 \u0442\u0435\u0441\u0442\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 N \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0438 \u043f\u0438\u043a\u043e\u0432\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u0418\u043d\u0442\u0440\u0438\u0433\u0430: \u043a\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 &#8211; Python \u0438\u043b\u0438 PyPy? \u041a\u0430\u043a \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c Erlang \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438? \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0430 V8 NodeJS? \u0418 \u043a\u0430\u043a \u043d\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043a\u043e\u0434 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c C.<!--more--><\/p>\n<h3>\u0422\u0435\u0440\u043c\u0438\u043d\u044b<\/h3>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u044b \u0441 \u043d\u0438\u043c\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c?<\/p>\n<dl>\n<dd>\u041d\u0435\u0441\u0442\u0440\u043e\u0433\u0438\u0439 HTML \u043f\u0430\u0440\u0441\u0435\u0440<\/dd>\n<dt>\u043f\u0430\u0440\u0441\u0435\u0440 HTML, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 HTML \u043a\u043e\u0434 (\u043d\u0435\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0435 \u0442\u0435\u0433\u0438, \u0437\u043d\u0430\u043a\u0438 <code>&gt;<\/code> <code>&lt;<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u043e\u0432 <code>&lt;script&gt;<\/code>, \u043d\u0435\u0437\u0430\u044d\u0441\u043a\u0435\u0439\u043f\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0430\u043c\u043f\u0435\u0440\u0441\u0430\u043d\u0434\u0430 <code>&amp;<\/code>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0431\u0435\u0437 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u0438 \u0442.\u043f.). \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043d\u0435 \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0439 HTML \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043a \u0442\u043e\u043c\u0443 \u0432\u0438\u0434\u0443, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c HTML, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0439!<\/dt>\n<dd>DOM \u0434\u0435\u0440\u0435\u0432\u043e<\/dd>\n<dt>Document Object Model \u0435\u0441\u043b\u0438 \u043a\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e, \u0442\u043e DOM \u044d\u0442\u043e \u0442\u043e\u0442 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044f\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0434\u043b\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 HTML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u041c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b HTML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u0412 \u043a\u043e\u0440\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;html&gt;<\/code>, \u0435\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b &#8211; <code>&lt;head&gt;<\/code> \u0438 <code>&lt;body&gt;<\/code> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Python \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442<\/p>\n<pre>&lt;html lang=\"ru-RU\"&gt;\r\n    &lt;head&gt;&lt;\/head&gt;\r\n    &lt;body&gt;Hello, World!&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0432\u0438\u0434\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a<\/p>\n<pre>(\"html\", {\"lang\": \"ru-RU\"}, [\r\n    (\"head\", {}, []),\r\n    (\"body\", {}, [\"Hello, World!\"])\r\n])<\/pre>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e HTML \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0432 DOM \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c XPath \u0438\u043b\u0438 CSS \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b.<\/p>\n<\/dt>\n<\/dl>\n<h3>\u041a\u043e\u043d\u043a\u0443\u0440\u0441\u0430\u043d\u0442\u044b<\/h3>\n<ul>\n<li><strong>Erlang<\/strong>\n<ul>\n<li><a href=\"https:\/\/github.com\/mochi\/mochiweb\/blob\/master\/src\/mochiweb_html.erl\">Mochiweb html parser<\/a>. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u0438\u0439 HTML \u043f\u0430\u0440\u0441\u0435\u0440 \u0434\u043b\u044f Erlang. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u044d\u0440\u043b\u0430\u043d\u0433\u0435.<\/li>\n<\/ul>\n<\/li>\n<li><strong>CPython<\/strong>\n<ul>\n<li><a href=\"http:\/\/lxml.de\/\">lxml.etree.HTML<\/a>\u00a0\u0431\u0438\u043d\u0434\u0438\u043d\u0433 libxml2. Cython<\/li>\n<li><a href=\"http:\/\/www.crummy.com\/software\/BeautifulSoup\/bs3\/documentation.html\" target=\"_blank\">BeautifulSoup 3<\/a>\u00a0\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 python HTML DOM \u043f\u0430\u0440\u0441\u0435\u0440 (3-\u044f \u0432\u0435\u0440\u0441\u0438\u044f).<\/li>\n<li><a href=\"http:\/\/www.crummy.com\/software\/BeautifulSoup\/bs4\/doc\/\" target=\"_blank\">BeautifulSoup 4<\/a>\u00a0HTML DOM \u043f\u0430\u0440\u0441\u0435\u0440 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u043c\u0438 \u0431\u0435\u043a\u0435\u043d\u0434\u0430\u043c\u0438.<\/li>\n<li><a href=\"http:\/\/code.google.com\/p\/html5lib\/\" target=\"_blank\">html5lib<\/a>\u00a0\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435 DOM \u043f\u0430\u0440\u0441\u0435\u0440, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 HTML5.<\/li>\n<\/ul>\n<\/li>\n<li><strong>PyPy<\/strong> (\u0442\u0435 \u0436\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u044b, \u0447\u0442\u043e \u0438 CPython, \u043a\u0440\u043e\u043c\u0435 lxml)\n<ul>\n<li>BeautifulSoup 3<\/li>\n<li>BeautifulSoup 4<\/li>\n<li>html5lib<\/li>\n<\/ul>\n<\/li>\n<li><strong>Node.JS<\/strong>\n<ul>\n<li><a href=\"https:\/\/npmjs.org\/package\/cheerio\" target=\"_blank\">cheerio<\/a>\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 JS HTML DOM \u043f\u0430\u0440\u0441\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 jQuery API<\/li>\n<li><a href=\"https:\/\/npmjs.org\/package\/htmlparser\" target=\"_blank\">htmlparser<\/a>\u00a0HTML DOM \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JS<\/li>\n<li><a href=\"https:\/\/npmjs.org\/package\/jsdom\" target=\"_blank\">jsdom<\/a>\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 JS HTML DOM \u043f\u0430\u0440\u0441\u0435\u0440 \u0441 \u043d\u0430\u0432\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u043c API, \u043f\u043e\u0445\u043e\u0436\u0435\u043c \u043d\u0430 API \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/li>\n<\/ul>\n<\/li>\n<li><strong>C<\/strong>\n<ul>\n<li><a href=\"http:\/\/xmlsoft.org\/html\/libxml-HTMLparser.html\" target=\"_blank\">libxml2<\/a>\u00a0\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 C \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u0438\u0439 HTML SAX\/DOM \u043f\u0430\u0440\u0441\u0435\u0440.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u0426\u0435\u043b\u0438<\/h3>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u043f\u0430\u0440\u0441\u0438\u043d\u0433 HTML (\u043a\u0430\u043a \u0438 JSON) \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e. \u0412 \u043d\u0451\u043c \u043d\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432\u0440\u043e\u0434\u0435 &#8220;\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 10\u041a\u0431 &#8211; \u044d\u0442\u043e \u0441\u043f\u043b\u043e\u0448\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442, \u0435\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u043a \u0435\u0441\u0442\u044c&#8221;. \u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0442\u0435\u0433 <code>&lt;p&gt;<\/code>, \u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>&lt;\/<\/code>. \u0422\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e HTML \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c, \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 &#8220;\u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0451 \u043f\u043e 2 \u0440\u0430\u0437\u0430&#8221;. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438 \u0442\u0435\u0433 <code>&lt;option&gt;<\/code>, \u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 <code>&lt;\/option&gt;<\/code>. \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c\u0438 &#8211; \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u0435\u0441\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u044d\u0442\u043e <code>&lt;html&gt;...100 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u0442\u0435\u043a\u0441\u0442\u0430... &amp;amp; ...\u0435\u0449\u0451 100 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u0442\u0435\u043a\u0441\u0442\u0430...&lt;\/html&gt;<\/code>, \u0442\u043e \u043f\u0430\u0440\u0441\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u043b\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0442\u0435\u0433\u0430 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c &#8211; &#8220;&amp;amp;&#8221;, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 &#8220;&amp;&#8221; (\u0445\u043e\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 3 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u0430).<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u00a0\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 &#8211; \u0434\u0435\u0440\u0435\u0432\u043e \u0438\u0437 \u043c\u0435\u043b\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0436\u0435\u0441\u0442\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e, \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430, \u043d\u0430 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043c\u0435\u043b\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0448\u0438\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u043c \u0445\u043e\u0442\u0438\u043c:<\/p>\n<ul>\n<li>\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043d\u0435\u0441\u0442\u0440\u043e\u0433\u0438\u0445 HTML DOM \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432.<\/li>\n<li>\u0418\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0435\u0440\u0430. \u0412\u043e\u0437\u0440\u0430\u0441\u0442\u0435\u0442 \u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u043e\u0431\u044a\u0451\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439?<\/li>\n<li>\u041a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 HTML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/li>\n<li>\u041d\u0443 \u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u043d\u0435\u0434\u0436\u043c\u0435\u043d\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0432 \u043f\u043b\u0430\u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 <strong>\u043d\u0435 \u0431\u0443\u0434\u0435\u043c<\/strong>. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 API \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0435\u0440\u0435\u0432\u043e\u043c \u0442\u043e\u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430 \u043a\u0430\u0434\u0440\u043e\u043c.<\/p>\n<h3>\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441 \u0434\u0438\u0441\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0437\u0430\u0442\u0435\u043c N \u0440\u0430\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u0440\u0441\u0438\u0442 \u0435\u0433\u043e \u0432 \u0446\u0438\u043a\u043b\u0435.<br \/>\n\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0435 DOM \u0434\u0435\u0440\u0435\u0432\u043e.<br \/>\n\u041f\u043e\u0441\u043b\u0435 N \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0446\u0438\u043a\u043b\u0430 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430 \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 HTML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 N = 10, 50, 100, 400, 600 \u0438 1000 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439.<br \/>\n\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u043c User CPU, System CPU, Real runtime \u0438 (\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435?) \u043f\u0438\u043a\u043e\u0432\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>\/usr\/bin\/time<\/code>.<br \/>\nHTML \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li><em>page_google.html<\/em> (116Kb) &#8211; \u0432\u044b\u0434\u0430\u0447\u0430 \u0433\u0443\u0433\u043b\u0430, 50 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 HTML \u0438 JS, \u043c\u0430\u043b\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u0432\u0435\u0441\u044c HTML \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443.<\/li>\n<li><em>page_habrahabr-70330.html<\/em> (1,6Mb) &#8211; \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0441 900 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. \u041e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0433\u043e\u0432, \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438.<\/li>\n<li><em>page_habrahabr-index.html<\/em> (95Kb) &#8211; \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 habrahabr. \u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u043b\u043e\u0433\u0430.<\/li>\n<li><em>page_wikipedia.html<\/em> (99Kb) &#8211; \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 wikipedia. \u0425\u043e\u0442\u0435\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043c\u0430\u043b\u043e \u0442\u0435\u0433\u043e\u0432, \u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u0435 \u0441\u0430\u043c\u0443\u044e \u0443\u0434\u0430\u0447\u043d\u0443\u044e. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0433\u043e\u0432 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e CSS.<\/li>\n<\/ul>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u0430\u043b, \u0442.\u043a. \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0410 \u0442\u0430\u043a \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0435\u0449\u0451 \u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>\u0422\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 Ubuntu 3.5.0-19-generic x86_64, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Intel Core i7-3930K CPU @ 3.20GHz \u00d7 12. (\u041d\u0430\u0444\u0438\u0433\u0430 12 \u044f\u0434\u0435\u0440, \u0435\u0441\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e? \u042d\u0445\u0445&#8230;)<\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 <a title=\"html parser benchmark code\" href=\"https:\/\/github.com\/seriyps\/html-parsers-benchmark\" target=\"_blank\">\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 github<\/a>. \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432 README \u0444\u0430\u0439\u043b\u0435. \u0414\u0430\u0436\u0435 \u043d\u0435\u0442 &#8211; \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u0432\u0435\u0440\u0438\u0442\u044c \u043c\u043d\u0435, \u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438!<br \/>\n<em>Tip: \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u0435 Erlang \u0438\u043b\u0438 PyPy), \u0442\u043e \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f PLATFORMS.<\/em><br \/>\n\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u043c \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (PHP? Java? .NET? Ruby?), \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b (\u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 &#8211; \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0438 \u043a libxml \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438). \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u043a\u0430\u043a\u0438\u0445-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 HTML \u0444\u0430\u0439\u043b\u0430\u0445 (\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u0433\u043e\u0432, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0444\u0430\u0439\u043b\u043e\u0432).<\/p>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h3>\n<p>\u0412\u043e\u0442 \u0441\u044b\u0440\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0435 CSV \u0444\u0430\u0439\u043b\u043e\u0432 <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/results-1000.csv\">results-1000.csv<\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/results-600.csv\">results-600.csv<\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/results-400.csv\">results-400.csv<\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/results-100.csv\">results-100.csv<\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/results-50.csv\">results-50.csv<\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/results-10.csv\">results-10.csv<\/a>. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0445 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 R (\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0441 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 stats\/).<\/p>\n<h4>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c<\/h4>\n<p>\u0414\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 [\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b] \u043e\u0442 [\u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439]. \u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0435\u0440\u0430, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0447\u0438\u0441\u043b\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439. \u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0430 \u043b\u0443\u0447\u0448\u0435 &#8211; \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0442\u044c (\u0437\u0430 \u0441\u0447\u0435\u0442 <abbr title=\"Just in time compiler\">JIT<\/abbr> \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440).<\/p>\n<p style=\"text-align: center;\">\u0412\u0441\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u044b! \u041d\u0435 \u043b\u043e\u043c\u0430\u0439\u0442\u0435 \u0433\u043b\u0430\u0437\u0430!<\/p>\n<div class=\"img-group\"><strong>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 (\u0437\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 &#8211; \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a).<\/strong><br \/>\n<a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-841\" alt=\"html_parser_bench_pre-001\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-001.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-002.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-842\" alt=\"html_parser_bench_pre-002\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-002.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-003.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-843\" alt=\"html_parser_bench_pre-003\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-003.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-004.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-844\" alt=\"html_parser_bench_pre-004\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-004.png\" width=\"500\" height=\"350\" \/><\/a><\/div>\n<p>\u0421\u0442\u043e\u043b\u0431\u0438\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b &#8211; \u0445\u043e\u0440\u043e\u0448\u043e, \u0440\u0430\u0437\u043d\u043e\u0439 &#8211; \u043f\u043b\u043e\u0445\u043e. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435\u0442 (\u0432\u0441\u0435 \u0441\u0442\u043e\u043b\u0431\u0438\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b). \u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <em>BeautifulSoup 4<\/em> \u0438 <em>html5lib<\/em> \u043f\u043e\u0434 PyPy; \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0443 \u043d\u0438\u0445 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 PyPy \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0442\u044c\u0441\u044f. \u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e&#8230;<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a &#8211; \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u043c. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c box-plot \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<div class=\"img-group\"><strong>\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/strong><br \/>\n<a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-005.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851\" alt=\"html_parser_bench_pre-005\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-005.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-006.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-852\" alt=\"html_parser_bench_pre-006\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-006.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-853\" alt=\"html_parser_bench_pre-007\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-007.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-008.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-854\" alt=\"html_parser_bench_pre-008\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-008.png\" width=\"500\" height=\"350\" \/><\/a><\/div>\n<p>\u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u043e\u043a\u0441 &#8211; \u0442\u0435\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0430\u0440\u0441\u0435\u0440. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u043e\u043a\u0441 \u043f\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0442.\u0435. \u0432\u044b\u0448\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439). \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 C \u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442, \u0437\u0430 \u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0442 <em>lxml.etree<\/em>, \u043f\u043e\u0447\u0442\u0438 \u0432\u043f\u043b\u043e\u0442\u043d\u0443\u044e \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u043d\u0430 NodeJS \u0438 Erlang, \u043f\u043e\u0442\u043e\u043c <em>bsoup3<\/em> \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 PyPy, \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u043d\u0430 CPython \u0438 \u043f\u043e\u0442\u043e\u043c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0442\u0440\u044b\u0432\u043e\u043c \u0442\u0435 \u0436\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 PyPy. \u0412\u043e\u0442 \u0442\u0430\u043a \u0441\u044e\u0440\u043f\u0440\u0438\u0437! PyPy \u0432\u0441\u0435\u043c \u0441\u043b\u0438\u0432\u0430\u0435\u0442.<br \/>\n\u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c &#8211; bsoup 3 \u043f\u0430\u0440\u0441\u0435\u0440\u0443 \u043d\u0430 Python \u0447\u0435\u043c-\u0442\u043e \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 :-).<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code>&gt; subset(res, (file==&quot;page_google.html&quot;) &amp; (loops==1000))[ c(&quot;platform&quot;, &quot;parser&quot;, &quot;parser.s&quot;, &quot;real.s&quot;, &quot;user.s&quot;) ]<\/code>\r\n    platform                parser   parser.s real.s user.s\r\n6  c-libxml2 libxml2_html_parser.c   2.934295   2.93   2.92\r\n30    erlang     mochiweb_html.erl  13.346997  13.51  13.34\r\n14    nodejs     cheerio_parser.js   5.303000   5.37   5.36\r\n38    nodejs  htmlparser_parser.js   6.686000   6.72   6.71\r\n22    nodejs       jsdom_parser.js  98.288000  98.42  98.31\r\n33      pypy      bsoup3_parser.py  40.779929  40.81  40.62\r\n57      pypy      bsoup4_parser.py 434.215878 434.39 433.91\r\n41      pypy    html5lib_parser.py 361.008080 361.25 360.46\r\n65    python      bsoup3_parser.py  78.566026  78.61  78.58\r\n49    python      bsoup4_parser.py  33.364880  33.45  33.43\r\n60    python    html5lib_parser.py 200.672682 200.71 200.70\r\n67    python        lxml_parser.py   3.060202   3.08   3.08<\/pre>\n<h4>\u041f\u0430\u043c\u044f\u0442\u044c<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u0421\u043f\u0435\u0440\u0432\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439. \u0421\u043d\u043e\u0432\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435 \u0432\u0441\u0435 \u0441\u0442\u043e\u043b\u0431\u0438\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b. \u0415\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0442\u0435\u0442 \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0442\u043e \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u043c \u043c\u0443\u0441\u043e\u0440\u0430.<\/p>\n<div class=\"img-group\"><strong>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0430\u0440\u0441\u0435\u0440\u0430.<\/strong><br \/>\n<a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-009.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-865\" alt=\"html_parser_bench_pre-009\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-009.png\" width=\"500\" height=\"350\" \/><\/a><a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench-010.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-866\" alt=\"html_parser_bench_pre-010\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_pre-010.png\" width=\"500\" height=\"350\" \/><\/a><\/div>\n<p>\u0417\u0430\u043d\u044f\u0442\u043d\u043e. <em>Bsoup4<\/em> \u0438 <em>html5lib<\/em>\u00a0\u043f\u043e\u0434 PyPy \u0437\u0430\u043d\u044f\u043b\u0438 \u043f\u043e 5\u0413\u0431 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0441\u043b\u0435 1000 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e 1\u041c\u0431 \u0444\u0430\u0439\u043b\u0443. (\u041f\u0440\u0438\u0432\u0435\u043b \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e 2 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0442.\u043a. \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u0430). \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e PyPy \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 <em>Bsoup4<\/em> \u0438 <em>html5lib<\/em> \u043f\u0430\u0440\u0441\u0435\u0440\u0430\u043c\u0438. \u0421 \u0447\u0435\u043c \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0438 \u043a\u0442\u043e \u0432\u0438\u043d\u043e\u0432\u0430\u0442 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e, \u043d\u043e \u0437\u0430\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PyPy \u0431\u0435\u0437 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 &#8211; \u0432\u0435\u0441\u044c\u043c\u0430 \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435.<br \/>\n\u0412\u044b\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f PyPy \u0441 \u044d\u0442\u0438\u043c\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430\u043c\u0438 \u0432\u044b\u0431\u044b\u0432\u0430\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u0441 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432:<\/p>\n<div class=\"img-group\"><strong>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 (\u0431\u0435\u0437 Bsoup4 \u0438 html5lib \u043d\u0430 PyPy).<\/strong><br \/>\n<a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-009.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-871\" alt=\"html_parser_bench_dropped_pre-009\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-009.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-010.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-872\" alt=\"html_parser_bench_dropped_pre-010\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-010.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-011.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-873\" alt=\"html_parser_bench_dropped_pre-011\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-011.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-012.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-874\" alt=\"html_parser_bench_dropped_pre-012\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-012.png\" width=\"500\" height=\"350\" \/><\/a><\/div>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u0430 C \u0432\u0441\u0435 \u0441\u0442\u043e\u043b\u0431\u0438\u043a\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f <em>lxml.etree<\/em>. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 10 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e <code>time<\/code> \u043d\u0435 \u0443\u0441\u043f\u0435\u0432\u0430\u0435\u0442 \u0435\u0451 \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c. NodeJS \u043f\u0430\u0440\u0441\u0435\u0440 <em>jsdom<\/em> \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e &#8211; \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u043a\u0430\u0447\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0438\u0434\u0435\u043d \u0440\u043e\u0441\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043c\u0443\u0441\u043e\u0440\u0430.<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c box-plot.<\/p>\n<div class=\"img-group\"><strong>\u0423\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/strong><br \/>\n<a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-013.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-879\" alt=\"html_parser_bench_dropped_pre-013\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-013.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-014.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-880\" alt=\"html_parser_bench_dropped_pre-014\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-014.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-015.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-881\" alt=\"html_parser_bench_dropped_pre-015\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-015.png\" width=\"500\" height=\"350\" \/><\/a> <a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped-016.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-882\" alt=\"html_parser_bench_dropped_pre-016\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_dropped_pre-016.png\" width=\"500\" height=\"350\" \/><\/a><\/div>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043a\u0430\u043a \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u043d\u043e \u0443 Erlang \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 NodeJS. <em>lxml.etree<\/em> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 2 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c C <em>libxml2<\/em>, \u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440. NodeJS \u043f\u0430\u0440\u0441\u0435\u0440 <em>jsdom<\/em> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u043f\u0430\u0434\u0430\u0435\u0442 \u0438\u0437 \u043e\u0431\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u044b, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044f ~ \u0432 2 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 NodeJS \u043f\u0430\u0440\u0441\u0435\u0440\u044b &#8211; \u0432\u0438\u0434\u0438\u043c\u043e \u0443 \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 DOM \u0434\u0435\u0440\u0435\u0432\u0430.<br \/>\n\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre>\r\n<code>&gt; subset(res, (file==&quot;page_google.html&quot;) &amp; (loops==1000))[ c(&quot;platform&quot;, &quot;parser&quot;, &quot;maximum.RSS&quot;) ]<\/code>\r\n    platform                parser maximum.RSS\r\n6  c-libxml2 libxml2_html_parser.c        2240\r\n30    erlang     mochiweb_html.erl       21832\r\n14    nodejs     cheerio_parser.js       49972\r\n38    nodejs  htmlparser_parser.js       48740\r\n22    nodejs       jsdom_parser.js      119256\r\n33      pypy      bsoup3_parser.py       61756\r\n57      pypy      bsoup4_parser.py     1701676\r\n41      pypy    html5lib_parser.py     1741944\r\n65    python      bsoup3_parser.py       42192\r\n49    python      bsoup4_parser.py       54116\r\n60    python    html5lib_parser.py       45496\r\n67    python        lxml_parser.py        9364\r\n<\/pre>\n<h4>\u041e\u0432\u0435\u0440\u0445\u0435\u0434 \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h4>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442 HTML \u043f\u0430\u0440\u0441\u0435\u0440\u0430, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (\u0440\u0430\u0437 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435). \u041e\u0432\u0435\u0440\u0445\u0435\u0434 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b &#8211; \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0442\u0440\u0430\u0442\u0438\u0442 \u043d\u0435 \u043d\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443, \u0430 \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043a \u043d\u0435\u0439 (\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 HTML \u0444\u0430\u0439\u043b\u0430 \u0438 \u0442.\u043f.). \u0427\u0442\u043e \u0431\u044b \u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u0432\u044b\u0447\u0442\u0435\u043c \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0432\u0435\u043b\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <code>time<\/code> &#8211; &#8220;time.s&#8221;, \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043c\u0435\u0440\u0438\u043b\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0446\u0438\u043a\u043b\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 &#8211; &#8220;parser.s&#8221;.<\/p>\n<p><a href=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_overhead-001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-897\" alt=\"html_parser_bench_overhead_pre-001\" src=\"http:\/\/seriyps.ru\/blog\/wp-content\/uploads\/2012\/12\/html_parser_bench_overhead_pre-001.png\" width=\"500\" height=\"350\" \/><\/a><\/p>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0443 Erlang \u043e\u043d \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0439 \u0441 Python. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c &#8211; \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 C \u0432\u043f\u0435\u0440\u0435\u0434\u0438 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u0432\u0441\u0435\u0439 (\u043d\u043e \u0438 \u043a\u043e\u0434\u0430 \u0432 \u043d\u0435\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435).<\/p>\n<p>\u0411\u0438\u043d\u0434\u0438\u043d\u0433 libxml2 \u043a \u043f\u0438\u0442\u043e\u043d\u0443 (lxml.etree.HTML) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0432 2 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430). \u0412\u044b\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python \u044d\u0442\u043e lxml.<\/p>\n<p>\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 \u0433\u043e\u043b\u043e\u043c Erlang \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u0440\u0438\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u044d\u0440\u043b\u0430\u043d\u0433\u0443 &#8220;\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445&#8221; \u00a9. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u0430 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 NodeJS \u0438 \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0443 Python \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432. \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0438\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 C \u0438 lxml. \u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f. \u0422\u0430\u043a\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d (\u0447\u0442\u043e \u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b).<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u043d\u0430 NodeJS \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e &#8211; \u0432 2 \u0440\u0430\u0437\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0441\u0438\u0448\u043d\u043e\u0439 libxml. V8 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u041d\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 Python, \u043f\u0440\u0438\u0447\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e (\u0440\u0430\u0441\u0445\u043e\u0434 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0440\u0430\u0441\u0442\u0438 \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 10 \u0434\u043e 100, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f). \u041f\u0430\u0440\u0441\u0435\u0440 jsdom \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u044f\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u0443 \u043d\u0435\u0433\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 HTML \u0432 NodeJS \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 &#8211; cheerio.<\/p>\n<p>\u041f\u0430\u0440\u0441\u0435\u0440\u044b \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c Python \u0441\u043b\u0438\u0432\u0430\u044e\u0442 \u043a\u0430\u043a \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u043f\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0440\u0438\u0447\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0447\u0443\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445. \u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u043d\u0430 \u0440\u0430\u0437\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 (GC \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e?)<\/p>\n<p>\u041d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0445 \u0443\u0434\u0438\u0432\u0438\u043b PyPy. \u0422\u043e \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 GC, \u0442\u043e \u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f, \u0442\u043e \u043b\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e, \u0442\u043e \u043b\u0438 \u044f \u0433\u0434\u0435-\u0442\u043e \u043d\u0430\u043a\u043e\u0441\u044f\u0447\u0438\u043b, \u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u043d\u0430 PyPy \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442. Bsoup3 \u043f\u0430\u0440\u0441\u0435\u0440 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 CPython. \u0422.\u0435. \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043d\u0430 PyPy \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e Bsoup3, \u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u043f\u0435\u0440\u0435\u0434 CPython \u043e\u043d \u043d\u0435 \u0434\u0430\u0435\u0442.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u0443\u0441\u043e\u043a \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 Python \u043d\u0430 Erlang. \u0421\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e HTTP \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f CPU \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 HTML \u0432 DOM \u0434\u0435\u0440\u0435\u0432\u043e. \u0421\u043f\u0435\u0440\u0432\u0430 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c Erlang \u043f\u0430\u0440\u0441\u0435\u0440\u0430 mochiweb_html \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u0438\u0437 Python lxml.etree.HTML(). \u041f\u0440\u043e\u0432\u0435\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116],"tags":[233,232,229,183,171,22,230,235,234,228,231,227,249,236],"class_list":["post-833","post","type-post","status-publish","format-standard","hentry","category-programming","tag-beautifulsoup","tag-benchmark","tag-c","tag-dom","tag-erlang","tag-html","tag-libxml","tag-lxml","tag-mochiweb","tag-nodejs","tag-parser","tag-pypy","tag-python","tag-xpath"],"_links":{"self":[{"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/posts\/833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/comments?post=833"}],"version-history":[{"count":22,"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/posts\/833\/revisions"}],"predecessor-version":[{"id":910,"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/posts\/833\/revisions\/910"}],"wp:attachment":[{"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/media?parent=833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/categories?post=833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seriyps.com\/blog\/wp-json\/wp\/v2\/tags?post=833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}