{"id":322128,"date":"2021-02-05T13:39:00","date_gmt":"2021-02-05T05:39:00","guid":{"rendered":"http:\/\/4563.org\/?p=322128"},"modified":"2021-02-05T13:39:00","modified_gmt":"2021-02-05T05:39:00","slug":"%e8%af%9d%e8%af%b4%e6%9c%89%e5%85%b3-python-%e8%a7%a3%e9%87%8a%e5%99%a8%e7%9a%84-gil-%e9%97%ae%e9%a2%98%ef%bc%8c-java-%e7%ad%89%e8%af%ad%e8%a8%80%e6%98%af%e5%a6%82%e4%bd%95%e8%b7%a8%e8%bf%87%e7%bb%86","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=322128","title":{"rendered":"\u8bdd\u8bf4\u6709\u5173 Python \u89e3\u91ca\u5668\u7684 GIL \u95ee\u9898\uff0c Java \u7b49\u8bed\u8a00\u662f\u5982\u4f55\u8de8\u8fc7\u7ec6\u7c92\u5ea6\u9501\u7684\u5751\u7684\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bdd\u8bf4\u6709\u5173 Python \u89e3\u91ca\u5668\u7684 GIL \u95ee\u9898\uff0c Java \u7b49\u8bed\u8a00\u662f\u5982\u4f55\u8de8\u8fc7\u7ec6\u7c92\u5ea6\u9501\u7684\u5751\u7684\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u4e5f\u662f\u5b64\u964b\u5be1\u95fb\uff0c\u6628\u5929\u521a\u521a\u77e5\u9053\u4e00\u4e2a\u9879\u76ee\u53eb Pyston\uff0c\u8fd9\u662f\u4e00\u4e2a\u57fa\u4e8e cpython \u7684 jit \u66ff\u4ee3\u9879\u76ee\uff0c\u76ee\u524d\u4ec5\u80fd\u505a\u5230\u6bd4 python3.8 \u5feb 20%\uff0c\u4f46\u662f\u80dc\u5728\u5b8c\u7f8e\u517c\u5bb9\u6027\u3002<\/p>\n<p>\u60f3\u8d77\u6765\u6628\u5929\u770b\u5230\u4e00\u4e2a\u89c2\u70b9\uff0c\u6709\u4e2a\u4eba\u8bf4\u5f00\u53d1\u6548\u7387\u548c\u8fd0\u884c\u6548\u7387\u5e76\u975e\u77db\u76fe\uff0c\u4ed6\u4ee5 pypy \u4e3a\u4f8b\uff0c\u89e3\u91ca\u4e3a\u4ec0\u4e48 pypy \u53ef\u4ee5\u5b9e\u73b0 jit \u800c cpython \u4e0d\u80fd\uff0c\u4e3b\u8981\u8fd8\u662f\u56e0\u4e3a python \u7684\u5f00\u53d1\u6548\u7387\u548c c \u7684\u5de5\u4f5c\u91cf\u95ee\u9898\u3002<\/p>\n<p>\u53d1\u6563\u6027\u601d\u7ef4\u60f3\u5230\uff0c\u4e5f\u8bb8\u672a\u6765\u4e00\u6bb5\u65f6\u95f4\uff0c\u6bd4\u5982\u4e24\u4e09\u5e74\u5185\uff0c\u4f1a\u6709\u52a0\u5165 jit \u7279\u6027\u7684 cpython \u89e3\u91ca\u5668\u53ef\u7528\uff0c\u8fd9\u6837\u4e5f\u8bb8 python \u8fd9\u95e8\u8bed\u8a00\u5728 jit \u8fd9\u4e2a\u95ee\u9898\u4e0a\u5df2\u7ecf\u627e\u5230\u4e86\u7ec8\u6781\u89e3\u51b3\u65b9\u6848\u3002\u90a3\u4e48\u5269\u4e0b\u7684\u5e7f\u4e3a\u8bdf\u75c5\u7684\u8fd0\u884c\u6548\u7387\u95ee\u9898\u4f3c\u4e4e\u53ea\u5269\u4e0b\u5168\u5c40\u89e3\u91ca\u9501\u7684\u95ee\u9898\u3002<\/p>\n<p>\u4f17\u6240\u5468\u77e5 python \u5f53\u521d\u636e\u4f20\u662f 1.5 \u7248\u672c\uff0c\u786e\u5b9e\u6709\u8fc7\u975e GIL \u8bbe\u8ba1\u7684\u89e3\u91ca\u5668\uff0c\u636e\u79f0\u5f53\u65f6\u7ed3\u679c\u662f\u7ec6\u7c92\u5ea6\u9501\uff0c\u4ee5\u53ca cache miss \u4f1a\u5bfc\u81f4\u6267\u884c\u6548\u7387\u76f4\u63a5\u8170\u65a9\uff0c\u800c\u4e14\u4f3c\u4e4e\u4e0d\u53ef\u907f\u514d\u3002\u90a3\u4e48 Java \u7b49\u8bed\u8a00\u5f53\u521d\u662f\u5982\u4f55\u5904\u7406\u7ec6\u7c92\u5ea6\u9501\u7684\u95ee\u9898\u7684\u5462\uff1f\u662f\u5426\u610f\u5473\u7740\u4e16\u754c\u4e0a\u5b58\u5728\u4e00\u79cd\u7248\u672c\u7684 java\uff0c\u4f1a\u6bd4\u73b0\u884c\u7248\u672c\u8fd0\u884c\u901f\u5ea6\u9ad8\u4e00\u500d\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bdd\u8bf4\u6709\u5173 Python \u89e3\u91ca\u5668\u7684 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/322128"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322128"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/322128\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322128"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}