{"id":162107,"date":"2012-12-10T19:01:03","date_gmt":"2012-12-10T15:01:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=162107"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=162107","title":{"rendered":"<span class=\"post_title\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 Android. \u0427\u0430\u0441\u0442\u044c 1: \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JavaScript<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0445\u0430\u0431\u0440\u0430\u044e\u0437\u0435\u0440\u044b. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0433\u0440\u0443 \u043d\u0430 html5 + PhoneGap, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434\u0443\u0435\u0442. \u0412\u043e\u0442 \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u043e\u0434 Android \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 PhoneGap \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e:<\/p>\n<p>  1. \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JavaScript.<br \/>  2. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DOM.<br \/>  3. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Canvas.<br \/>  4. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WebGL.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 JavaScript, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0438 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0444\u0438\u0437\u0438\u043a\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0433\u0440\u0443\u0448\u0435\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432, \u0442\u043e \u0437\u0434\u0435\u0441\u044c JS \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0440\u0443\u0431\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<br \/>  \u0418 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u043c\u043d\u043e\u0436\u0438\u0442\u044c, \u0434\u043e\u0431\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0435\u043d\u044c \u0438 \u0434\u0435\u043b\u044c\u0438\u0442\u044c \u043c\u0438\u043b\u0438\u043e\u043d \u0440\u0430\u0437, \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"javascript\">for (i = 1; i &lt;= 1000000; i++) { \ttmp1 = Math.random() * Number.MAX_VALUE; \ttmp2 = Math.sqrt(tmp1); \ttmp3 = tmp1 \/ tmp2; } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;html&gt; &lt;style type=&quot;text\/css&quot;&gt; \t#mean { \t\tcolor: #8b0000; \t} &lt;\/style&gt; &lt;body&gt;  &lt;\/body&gt; &lt;script&gt;  \tvar iteration = 0; \tvar sumTime = 0;  \tvar init = function () { \t\tdocument.addEventListener('click', onClick); \t};  \tvar onClick = function (e) { \t\tvar i, \t\t\t\ttmp1, \t\t\t\ttmp2, \t\t\t\ttmp3, \t\t\t\tt1, \t\t\t\tt2, \t\t\t\tcurrentTime;  \t\tt1 = new Date(); \t\tfor (i = 1; i &lt;= 1000000; i++) { \t\t\ttmp1 = Math.random() * Number.MAX_VALUE; \t\t\ttmp2 = Math.sqrt(tmp1); \t\t\ttmp3 = tmp1 \/ tmp2; \t\t} \t\tt2 = new Date(); \t\tcurrentTime = t2.getTime() - t1.getTime(); \t\tdocument.body.innerHTML += 'Time: ' + currentTime.toString() + ' ms &lt;br&gt;';  \t\titeration++; \t\tsumTime += currentTime; \t\tif (iteration == 10) { \t\t\tdocument.body.innerHTML += '&lt;div id=&quot;mean&quot;&gt;Mean:' + (sumTime \/ iteration).toString() + 'ms &lt;\/div&gt;&lt;br&gt;'; \t\t\titeration = 0; \t\t\tsumTime = 0; \t\t} \t};  \tdocument.addEventListener(&quot;DOMContentLoaded&quot;, init, false); &lt;\/script&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435 Samsung Galaxy Tab 2 P 5100.<br \/>  \u0412 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 Android, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043a\u0430\u043a PhoneGap \u0438 Adobe AIR.<\/p>\n<p>  <i><b>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/b><\/i>  <\/p>\n<table border=\"1\">\n<tr>\n<td> Browser   <\/td>\n<td> Version   <\/td>\n<td> Milliseconds   <\/td>\n<\/tr>\n<tr>\n<td> Opera   <\/td>\n<td> 12.1.3   <\/td>\n<td> 896   <\/td>\n<\/tr>\n<tr>\n<td> Firefox   <\/td>\n<td> 17.0   <\/td>\n<td> 176   <\/td>\n<\/tr>\n<tr>\n<td> Chrome   <\/td>\n<td> 18.0   <\/td>\n<td> 76   <\/td>\n<\/tr>\n<tr>\n<td> Android borwser   <\/td>\n<td> <\/td>\n<td> 161   <\/td>\n<\/tr>\n<tr>\n<td> PhoneGap   <\/td>\n<td> 2.2.0   <\/td>\n<td> 157   <\/td>\n<\/tr>\n<tr>\n<td> Adobe AIR   <\/td>\n<td> 3.5.0.60   <\/td>\n<td> 158   <\/td>\n<\/tr>\n<\/table>\n<p>  <i><b>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435:<\/b><\/i><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/18b\/b9e\/c34\/18bb9ec34010750ec29efb8e2e06e661.png\" alt=\"\u0414\u0438\u0430\u0433\u0440\u0430\u043c\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 Android\"\/><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/h3>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u043e\u043f\u0435\u0440\u0430 \u0437\u0430\u0440\u0443\u0431\u0438\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c js \u043d\u0430 \u043a\u043e\u0440\u043d\u0435. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 ff, \u0437\u0430\u0442\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432 PhoneGap \u0438 Adobe AIR, \u0447\u0442\u043e \u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0434\u044c \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442\u0436\u0435 WebKit.<br \/>  \u041a\u0442\u043e \u0431\u044b \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u043b\u0441\u044f \u0445\u0440\u043e\u043c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0447\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0447\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u0435, \u0432\u0435\u0434\u044c \u043e\u043d\u0438 \u043e\u0431\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 WebKit.<br \/>  \u0421\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u0435\u043d, \u0438 \u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0433\u0440\u044b \u0432 \u044d\u0442\u0438\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445, \u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u0441\u0434\u0435\u043b\u0430\u043d, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435.    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/162107\/\"> http:\/\/habrahabr.ru\/post\/162107\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u0445\u0430\u0431\u0440\u0430\u044e\u0437\u0435\u0440\u044b. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0433\u0440\u0443 \u043d\u0430 html5 + PhoneGap, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434\u0443\u0435\u0442. \u0412\u043e\u0442 \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u043e\u0434 Android \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 PhoneGap \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e:<\/p>\n<p>  1. \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c JavaScript.<br \/>  2. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DOM.<br \/>  3. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Canvas.<br \/>  4. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WebGL.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-162107","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/162107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=162107"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/162107\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=162107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=162107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=162107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}