{"id":177450,"date":"2020-10-29T23:43:20","date_gmt":"2020-10-29T15:43:20","guid":{"rendered":"http:\/\/4563.org\/?p=177450"},"modified":"2020-10-29T23:43:20","modified_gmt":"2020-10-29T15:43:20","slug":"%e5%90%ac%e8%af%b4-python-%e7%9a%84%e5%a4%9a%e7%ba%bf%e7%a8%8b%e6%98%af%e5%81%87%e7%9a%84%ef%bc%8c%e6%97%a0%e6%b3%95%e5%88%a9%e7%94%a8%e5%a4%9a%e6%a0%b8%e5%bf%83%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=177450","title":{"rendered":"\u542c\u8bf4 Python \u7684\u591a\u7ebf\u7a0b\u662f\u5047\u7684\uff0c\u65e0\u6cd5\u5229\u7528\u591a\u6838\u5fc3\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u542c\u8bf4 Python \u7684\u591a\u7ebf\u7a0b\u662f\u5047\u7684\uff0c\u65e0\u6cd5\u5229\u7528\u591a\u6838\u5fc3\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : James369 <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u8c8c\u4f3c js \u4e5f\u662f\u5355\u7ebf\u7a0b\uff0c\u5509\uff0c\u811a\u672c\u8bed\u8a00\u3002\u3002<\/p>\n<p>\u67e5\u4e86\u4e00\u4e0b python \u6709\u4e00\u4e2a\u53eb GIL \u7684\u5168\u5c40\u9501\uff0c\u672c\u8d28\u4e0a\u65e0\u6cd5\u505a\u5230\u591a CPU \u6838\u5fc3\u7684\u540c\u65f6\u5229\u7528\u4e86\uff1f<\/p>\n<p>\u90a3\u6211\u73b0\u5728\u6709\u51e0\u4e2a\u91cd CPU \u7684\u4efb\u52a1\uff0c\u53ea\u80fd\u7528\u591a\u8fdb\u7a0b\u6765\u5b9e\u73b0\u4e86\uff1f\u8fd8\u5f97\u641e\u591a\u8fdb\u7a0b\u901a\u4fe1\u3002\u3002      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>29<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3927837\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coderluan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8c03 C \u7684\u591a\u7ebf\u7a0b\u5c31\u884c, \u4e0d\u8981\u7528\u591a\u8fdb\u7a0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927838\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coderxy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             nodejs \u5c31\u662f\u65e0\u6cd5\u5229\u7528\u591a\u6838\u5fc3\uff0c\u6240\u4ee5\u4f1a\u8d77\u591a\u4e2a\u8fdb\u7a0b\u3002 \u4e0d\u8fc7\u73b0\u5728\u5f88\u591a\u90fd\u662f k8s \u73af\u5883\u4e0b\uff0c\u5355\u4e2a pod \u53ea\u5229\u7528\u5355\u6838\u5fc3\u4e5f\u6ca1\u6bdb\u75c5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927839\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : James369 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @coderluan \u600e\u4e48\u8c03\uff0c\u6709\u76f8\u5173\u7684\u5305\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927840\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coderluan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @James369 \u81ea\u5df1\u641c\u53bb, \u4e00\u641c\u4e00\u5806.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927841\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jdhao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u5177\u4f53\u4ec0\u4e48\u95ee\u9898\uff1f\u5982\u679c\u662f io \u5bc6\u96c6\u578b\u64cd\u4f5c\uff0c\u7528 asyncio \u6216\u8005 threadpoolexecutor \u505a\u5e76\u53d1\u4e0d\u4e00\u5b9a\u6162\uff0c\u5e72\u561b\u975e\u5f97\u591a\u7ebf\u7a0b\u3002<\/p>\n<p>\u6216\u8005 cpu \u5bc6\u96c6\u64cd\u4f5c\uff0c\u591a\u8fdb\u7a0b\u505a\u4e5f\u6ca1\u95ee\u9898\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927842\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chaleaoch <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u91cd CPU \u4efb\u52a1\u662f\u6307\u8ba1\u7b97\u5bc6\u96c6\u5417?<br \/>\u8ba1\u7b97\u5bc6\u96c6\u4f60\u7528 python?<\/p>\n<p>node \u4e3b\u7ebf\u7a0b\u786e\u5b9e\u662f\u5355\u7ebf\u7a0b, \u4e0d\u8fc7 Node \u672c\u8eab\u81ea\u5df1\u90fd\u627f\u8ba4\u64c5\u957f IO \u4e0d\u64c5\u957f CPU \u8ba1\u7b97.<\/p>\n<p>\u4e0d\u77e5\u9053\u5410\u69fd\u70b9\u5728\u54ea\u91cc.                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927843\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : em70 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u7ecf\u5e38 20 \u4e2a python \u8fdb\u7a0b\u8dd1\u6ee1 CPU \u7684,\u5199\u5728\u4e00\u4e2a\u8fdb\u7a0b\u91cc\u8fd8\u9ebb\u70e6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927844\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : GrayXu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3a\u4ec0\u4e48\u4e0d\u597d\u597d\u7528\u641c\u7d22\u5f15\u64ce\u5462\uff1f<\/p>\n<p>import multiprocessing                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927845\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : est <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             LZ \u6050\u6015\u4e5f\u6ca1\u542c\u8bf4\u8fc7\u51e0\u4e2a\u80fd\u7528\u7cfb\u7edf\u5185\u6838\u7ebf\u7a0b\u7684\u8bed\u8a00\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927846\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : oahebky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5176\u5b9e Python \u7684\u591a\u8fdb\u7a0b\u548c\u591a\u7ebf\u7a0b\u5dee\u4e0d\u591a\u597d\u5199\uff1b<\/p>\n<p>\u5982\u679c\u4f60\u7ebf\u7a0b\u95f4\u4f20\u9012\u6570\u636e\u8981\u8003\u8651\u52a0\u9501\uff0c<br \/>\u800c\u8fdb\u7a0b\u95f4\u4f20\u9012\u6570\u636e\u6d89\u53ca\u5230\u8fdb\u7a0b\u95f4\u901a\u4fe1\uff08\u4f46\u662f Python \u7684\u5e93\u5df2\u7ecf\u5c01\u88c5\u597d\u4e86\uff0c\u5f88\u5bb9\u6613\u8c03\u7528\u4f20\u9012\u6570\u636e\uff09<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4\uff0c\u4f60\u8981\u201c\u5e76\u884c\u6267\u884c\u201d\uff0c\u5176\u5b9e\u5728 Python \u4e2d\u5199\u7ebf\u7a0b\u548c\u8fdb\u7a0b\u51e0\u4e4e\u6ca1\u6709\u5dee\u522b\u3002<\/p>\n<p>\u5982\u679c\u4f60\u6d89\u53ca\u5230\u5e76\u884c\u6267\u884c\u7684\u201c\u4e1c\u897f\u201d\u8981\u4f20\u9012\u6570\u636e\uff0c\u53ea\u662f\u628a\u7ebf\u7a0b\u52a0\u9501\u7684\u601d\u8003\u6362\u6210\u8fdb\u7a0b\u95f4\u901a\u4fe1\u7684\u601d\u8003\uff0c\u4e5f\u5dee\u4e0d\u591a\u3002<\/p>\n<p>\u7136\u540e\u5982\u679c\u662f\u90a3\u79cd\u7528 queue \u53d1\u6d88\u606f\u7684\u4f20\u9012\u6570\u636e\u7c7b\u578b\uff0c\u5728 Python \u4e2d\u8fdb\u7a0b\u548c\u7ebf\u7a0b\u7684\u5199\u6cd5\u4e5f\u662f\u975e\u5e38\u50cf&#8230;<\/p>\n<p>\u6240\u4ee5\u95ee\u9898\u4e0d\u5728\u4e8e GIL\uff0c<\/p>\n<p>\u95ee\u9898\u5728\u4e8e\uff1a<br \/>1. programmer \u662f\u5426\u7406\u89e3\u5e76\u53d1\u548c\u5e76\u884c<br \/>2. \u662f\u5426\u7406\u89e3 IO \u5bc6\u96c6\u548c CPU \u5bc6\u96c6<br \/>3. \u662f\u5426\u77e5\u9053 Python \u6709 GIL \u8fd9\u4e2a\u4e1c\u897f<br \/>4. programmer \u638c\u63e1\u7684\u5e76\u53d1\u7f16\u7a0b\u300c\u6a21\u578b\u300d\u7684\u6c34\u5e73\u3002<\/p>\n<p>\u800c\u5176\u5b83\u8bed\u8a00\uff08\u6bd4\u5982 golang \uff09\u597d\u5199\u5e76\u53d1\u4ee3\u7801\uff08\u591a\u7ebf\u7a0b\uff09\uff0c\u5e94\u8be5\u662f\u4eba\u5bb6\u5df2\u7ecf\u7ed9\u4f60\u9650\u5b9a\u597d\u4e86\u4e00\u79cd\u5e76\u53d1\u6a21\u578b\uff0c\u8ba9\u201c\u5165\u95e8\u8005\u201d\u7684\u5c31\u7167\u7740\u8fd9\u4e48\u5199\u5c31\u597d\u4e86\uff08\u6069\uff0c\u6211\u6ca1\u7528\u8fc7 golang\uff0c\u4f46\u662f\u6211\u731c\u662f golang \u8fd9\u6837\u5b50\u7684\uff0c\u6709\u4e0d\u5bf9\u6b22\u8fce\u6307\u6b63\uff09\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927847\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leavic <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6240\u4ee5\u6211\u76f4\u63a5\u591a\u8fdb\u7a0b\u4e0d\u5c31\u884c\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927848\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : oahebky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bf9\u4e86 \u201c\u95ee\u9898\u5728\u4e8e\uff1a\u201d \u8fd8\u8981\u518d\u63d2\u5165\u4e00\u4e2a\u70b9\uff0c<\/p>\n<p>\u201c3. \u662f\u5426\u7406\u89e3\u2018\u7ebf\u7a0b\u5185\u5b58\uff08\u53d8\u91cf\uff09\u5171\u4eab\u2019 \u548c \u2018\u8fdb\u7a0b\u5185\u5b58\u62f7\u8d1d\u2019 \u4e4b\u95f4\u7684\u533a\u522b\u201d\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927849\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaoshenke <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @oahebky \u597d\u4e0d\u597d\u5199\u4e0d\u5173\u952e\u3002\u8fdb\u7a0b\u8017 cpu \u3002java \u6765\u5b9e\u73b0\u5f00 20 \u4e2a\u7ebf\u7a0b\uff0cpy \u5c31\u9700\u8981 20 \u4e2a\u8fdb\u7a0b\uff0c\u9ad8\u4e0b\u7acb\u5224                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927850\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : oahebky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaoshenke <\/p>\n<p>\u4f60\u7684\u8fd9\u79cd\u6bd4\u8f83\u5728\u9009\u62e9\u4e86\u811a\u672c\u8bed\u8a00 \/\u52a8\u6001\u8bed\u8a00\u7684\u7a0b\u5e8f\u5458\u773c\u91cc\u6ca1\u6709\u610f\u4e49\u3002<\/p>\n<p>\u81f3\u5c11\u5728\u6211\u8fd9\u8fb9\u6ca1\u6709\u610f\u4e49\u3002<\/p>\n<p>\u5982\u679c\u8bf4\u522b\u7684\u8bed\u8a00\u5e76\u884c\u6bd4\u8f83\u597d\u5199\uff0c\u6211\u4f1a\u89c9\u5f97\u662f\u4f18\u70b9\u3002<\/p>\n<p>\u4f46\u662f\u5982\u679c\u8bf4\u522b\u7684\u8bed\u8a00\u591a\u7ebf\u7a0b\u5229\u7528 CPU \u6bd4 Python \u591a\u8fdb\u7a0b\u5229\u7528 CPU \u201c\u6548\u7387\u201d\u66f4\u9ad8\uff0c\u5728\u6211\u8fd9\u8fb9\u6ca1\u6709\u610f\u4e49\u3002<\/p>\n<p>\u56e0\u4e3a\u5c31\u662f\u6709\u50cf\u6211\u8fd9\u7c7b\u5f00\u53d1\u8005\u5e76\u4e0d\u5173\u5fc3\u4e00\u95e8\u8bed\u8a00\u5728\u673a\u5668\u4e0a\u7684\u6267\u884c\u901f\u5ea6\uff0c\u800c\u662f\u7f16\u7a0b\u8bed\u8a00\u7684\u5176\u5b83\u65b9\u9762\u3002<\/p>\n<p>\uff08\u5f53\u7136\uff0c\u6839\u636e\u5e94\u7528\u7684\u4e1a\u52a1\u573a\u666f\uff0c\u8bed\u8a00\u5728\u673a\u5668\u4e0a\u7684\u6267\u884c\u901f\u5ea6\u53ef\u80fd\u662f\u91cd\u8981\u7684\uff0c<br \/> \u4f46\u8fd9\u662f\u9488\u5bf9\u4e1a\u52a1\u7684\u6280\u672f\u9009\u578b\u95ee\u9898\uff0c\u4e0d\u662f\u7f16\u7a0b\u8bed\u8a00\u672c\u8eab\u7684\u95ee\u9898\uff1b<br \/> \u5c31\u50cf\u7528\u9524\u5b50\u53bb\u6572\u87ba\u4e1d\uff0c\u8fd9\u4e0d\u662f\u9524\u5b50\u7684\u95ee\u9898\uff0c\u8fd9\u662f\u4f60\u9009\u62e9\u9524\u5b50\u8fd8\u662f\u9009\u62e9\u87ba\u4e1d\u5200\u7684\u95ee\u9898\u3002\uff09                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927851\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kkbblzq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaoshenke \u6240\u4ee5\u624d\u8bf4\u8981\u786e\u5b9a\u4f60\u7684\u4e1a\u52a1\u662f\u4e0d\u662f CPU \u5bc6\u96c6\u578b\u7684\uff0c\u8c03\u5ea6\u8fd9\u5757\u7684\u786e\u7ebf\u7a0b\u6709\u4f18\u52bf\uff0c\u4f46\u662f\u4f60\u957f\u671f\u5360\u6ee1\u4e0d\u9700\u8981\u8c03\u5ea6\u7684\u60c5\u51b5\u4e0b\u5dee\u8ddd\u5c31\u5c0f\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927852\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ai277014717 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u7528\u652f\u6301\u5229\u7528\u591a\u6838\u7684\u8bed\u8a00\u6765\u5199\u7136\u540e\u5c01\u88c5\u6210 cli \u6216\u8005 libc \u6765\u8c03\u7528\u3002\u63a8\u8350 cli crash \u4e86\u4e0d\u4f1a\u5f71\u54cd\u7236\u8fdb\u7a0b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927853\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaoshenke <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @oahebky \u540c\u7406 \u4f60\u5728\u6bd4\u8f83\u8bed\u8a00\u597d\u4e0d\u597d\u5199\u5728\u6211\u8fd9\u91cc\u4e5f\u6ca1\u6709\u610f\u4e49                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927854\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chogath <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             CPU \u6838\u5fc3\u7684\u540c\u65f6\u5229\u7528\u8fd8\u662f\u5f97\u7528 C\uff0c\u53e6\u5916 node.js \u5176\u5b9e\u53ef\u4ee5\u4f7f\u7528 worker_threads \u6a21\u5757\u5f00\u542f\u591a\u7ebf\u7a0b\uff0c\u4e0d\u8fc7\u8981\u5904\u7406\u6570\u636e\u5171\u4eab\uff0c\u6211\u7684\u65b9\u6848\u662f\u4efb\u52a1\u542f\u52a8\u524d\u5148\u5199\u5165\u516c\u5171 JSON \u6587\u4ef6\u4e2d\uff0c\u7ebf\u7a0b\u4efb\u52a1\u72ec\u7acb\u5730\u8bfb\u53d6 JSON \u6587\u4ef6\u5185\u7684\u6570\u636e \/\u914d\u7f6e\u5e76\u6267\u884c\u4efb\u52a1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927855\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : acmore <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65e0\u8bba\u591a\u7ebf\u7a0b\u591a\u8fdb\u7a0b\u534f\u7a0b\u7ea4\u7a0b\uff0c\u672c\u8d28\u90fd\u662f\u4e3a\u4e86\u63d0\u5347 CPU \u7684\u5229\u7528\u7387\u3002\u5982\u679c\u4f60\u8981\u5904\u7406\u7684\u4efb\u52a1\u662f I\/O \u5bc6\u96c6\u578b\u7684\uff0c\u90a3\u4e48\u76f4\u63a5\u7528 Python \u534f\u7a0b\u5c31\u597d\u4e86\uff0c\u6548\u7387\u5f88\u6709\u53ef\u80fd\u6bd4\u591a\u7ebf\u7a0b\u6216\u8005\u591a\u8fdb\u7a0b\u66f4\u9ad8\u3002\u5982\u679c\u4f60\u8981\u5904\u7406\u7684\u4efb\u52a1\u662f\u8ba1\u7b97\u5bc6\u96c6\u578b\u7684\uff0c\u90a3\u4e48 Python \u591a\u8fdb\u7a0b \/ C \u6269\u5c55\u591a\u7ebf\u7a0b\u662f\u66f4\u597d\u7684\u9009\u62e9\uff0c\u5f53\u7136\u6700\u597d\u7684\u9009\u62e9\u662f\u7528\u5176\u4ed6\u8bed\u8a00\u3002<\/p>\n<p>\u53e6\u5916 JS \u662f\u5355\u7ebf\u7a0b \u2260 JS \u53ea\u80fd\u5229\u7528\u4e00\u4e22\u4e22\u8ba1\u7b97\u8d44\u6e90\uff0c\u8fd9\u91cc\u7684\u5355\u7ebf\u7a0b\u786e\u5207\u6765\u8bf4\u662f\u7528\u6237\u80fd\u76f4\u63a5\u64cd\u4f5c\u7684\u662f\u5355\u7ebf\u7a0b\u3002\u65e0\u8bba\u5728\u6d4f\u89c8\u5668\u8fd8\u662f\u5728 Node \u5e73\u53f0\u4e0a\uff0c\u80cc\u540e\u90fd\u6709\u4e00\u5806\u5de5\u4f5c\u7ebf\u7a0b\u5728\u505a\u4e8b\u3002\u80fd\u6700\u5927\u9650\u5ea6\u5229\u7528\u8d44\u6e90\u624d\u662f\u76f4\u63a5\u548c\u6700\u7ec8\u7684\u76ee\u6807\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927856\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Meltdown <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7ecf\u5e38\u770b\u5230\u4f60\u4e0d\u4e00\u5b9a\u9700\u8981\u771f\u6b63\u7684\u591a\u7ebf\u7a0b\u8fd9\u79cd\u56de\u7b54\u5c31\u611f\u89c9\u597d\u7a9d\u706b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927857\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nightwitch <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaoshenke \u770b\u5e73\u53f0\u7684\uff0c\u5728 Linux \u4e0b\u7ebf\u7a0b\u548c\u8fdb\u7a0b\u7684\u5f00\u9500\u57fa\u672c\u662f\u76f8\u540c\u7684\uff0c\u90fd\u662f\u4e00\u4e2a task_struct \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927858\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ivi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             LZ\uff0c\u60f3\u95ee\u4e0b\u591a\u7ebf\u7a0b=\u5e76\u53d1\u6267\u884c\u8fd9\u4e2a\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927859\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaoshenke <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nightwitch \uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\u600e\u4e48\u53ef\u80fd                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927860\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : maxxfire <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ivi python \u4e2d\u7684\u591a\u7ebf\u7a0b\uff0c\u5b9e\u8d28\u4e0a\u662f\u5355 CPU \u6267\u884c\uff0c\u975e\u5e76\u53d1\u64cd\u4f5c\u3002\u56e0\u4e3a\u6709\u4e2a\u5168\u5c40\u9501\u5728\u540c\u6b65\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927861\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fasionchan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5173\u4e8e GIL \u7684\u7531\u6765\u3001Python \u865a\u62df\u673a\u7ebf\u7a0b\u8c03\u5ea6\u3001IO \u5bc6\u96c6\u578b\u4ee5\u53ca\u8ba1\u7b97\u5bc6\u96c6\u578b\u7a0b\u5e8f\u533a\u522b\u3001\u4ee5\u53ca\u5982\u4f55\u7ed5\u8fc7 GIL \u53d6\u5f97\u591a\u6838\u5fc3\u5229\u7528\u80fd\u529b\u8fd9\u4e9b\u8bdd\u9898\uff0c\u53ef\u4ee5\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0\uff1a<\/p>\n<p>https:\/\/mp.weixin.qq.com\/s\/lIkcTuCX5htQcteklCFaZw                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927862\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaoshenke \u4f60\u5bf9\u7ebf\u7a0b\u548c\u8fdb\u7a0b\u5173\u7cfb\u7406\u89e3\u9519\u8bef\u3002<br \/>\u8fdb\u7a0b\u5c31\u662f\u5185\u6838\u72ec\u7acb\u914d\u7ed9\u8d44\u6e90\u7684\u7ebf\u7a0b\uff0c\u7ebf\u7a0b\u5c31\u662f\u5171\u4eab\u90e8\u5206\u8d44\u6e90\u7684\u8fdb\u7a0b\uff0c\u4e24\u8005\u5728 CPU \u5bc6\u96c6\u8fd0\u7b97\u4e0a\u6ca1\u6709\u533a\u522b\u3002<br \/>\u4e4b\u524d\u8fd8\u6709 IPC \u7684\u95ee\u9898\uff0c\u4f46\u73b0\u5728\u8fd8\u6709 shared_memory\uff0c\u533a\u522b\u66f4\u52a0\u6a21\u7cca                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927863\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             lz \u4f60\u662f\u6ca1\u5206\u6e05\u5e76\u53d1\uff08 concurrency \uff09\u548c\u5e76\u884c\uff08 parallel \uff09\u2026\u2026<br \/>\u591a\u7ebf\u7a0b = \u5e76\u53d1\u51e0\u4e4e\u662f\u5bf9\u7684 \u2014\u2014 \u9664\u975e\u4f60\u5f3a\u884c\u7528 PC \u9501\uff0c\u8fd9\u4e2a\u64cd\u4f5c\u65e2\u9ebb\u70e6\u53c8\u96be\u4ee5\u7406\u89e3\uff0c\u4f46\u6211\u786e\u5b9e\u53ef\u4ee5\u5f00\u4e94\u4e2a\u7ebf\u7a0b\uff0c\u5e76\u4e14\u901a\u8fc7\u9501\u548c\u961f\u5217\u6765\u5f3a\u5236\u4e25\u683c\u7684\u6267\u884c\u987a\u5e8f\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927864\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaoshenke <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @no1xsyzy \u5408\u7740\u8d77\u8fdb\u7a0b\u4e0d\u9700\u8981\u6709\u62f7\u8d1d\u6bcd\u8fdb\u7a0b\u5206\u914d\u8fdb\u7a0b\u8d44\u6e90\u7684\u8fc7\u7a0b\u4e86\u3002\u6211\u770b\u4f60\u662f\u8bfb\u4e66\u8bfb\u50bb\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3927865\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaoshenke copy on write \u554a\u2026\u2026<br \/>20 \u4e2a\u8fdb\u7a0b\u9664\u4e86\u6c61\u67d3 ps \u5217\u8868\u548c\u9700\u8981 IPC \u4ee5\u5916\u6ca1\u4ec0\u4e48\u6bdb\u75c5<br \/>\u800c\u4e14 20 \u4e2a\u7ebf\u7a0b\u4f9d\u7136\u6709\u4e0a\u4e0b\u6587\u5207\u6362\u548c\u7f13\u5b58\u672a\u547d\u4e2d\u7684\u95ee\u9898\uff0cGC \u66f4\u662f\u51e0\u767e\u500d\u6d88\u8017\u3002<br \/>\u4f60\u8fd9\u4e48\u8bf4\u4e0d\u5982\u76f4\u63a5 C \/ C++ \/ Rust\uff0cJava \u7b97\u4e2a\u96d5\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u542c\u8bf4 Python \u7684\u591a\u7ebf\u7a0b\u662f\u5047\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\/177450"}],"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=177450"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/177450\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177450"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}