{"id":10008419,"date":"2024-03-04T13:21:25","date_gmt":"2024-03-04T05:21:25","guid":{"rendered":"https:\/\/blog.itmax.cn\/?p=10008419"},"modified":"2024-03-04T13:21:25","modified_gmt":"2024-03-04T05:21:25","slug":"%e8%bf%99%e6%b3%a2%e6%93%8d%e4%bd%9c%e7%9c%8b%e9%ba%bb%e4%ba%86%ef%bc%81%e5%8d%81%e4%ba%bf%e8%a1%8c%e6%95%b0%e6%8d%ae%ef%bc%8c%e4%bb%8e71s%e5%88%b01-7s%e7%9a%84%e4%bc%98%e5%8c%96%e4%b9%8b%e8%b7%af","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10008419","title":{"rendered":"\u8fd9\u6ce2\u64cd\u4f5c\u770b\u9ebb\u4e86\uff01\u5341\u4ebf\u884c\u6570\u636e\uff0c\u4ece71s\u52301.7s\u7684\u4f18\u5316\u4e4b\u8def\u3002"},"content":{"rendered":"<p>\u4f60\u597d\u5440\uff0c\u6211\u662f\u6b6a\u6b6a\u3002<\/p>\n<p>\u6625\u8282\u671f\u95f4\u5173\u6ce8\u5230\u4e86\u4e00\u4e2a\u5173\u4e8e Java \u65b9\u9762\u7684\u6bd4\u8d5b\uff0c\u5f88\u6709\u610f\u601d\u3002\u7531\u4e8e\u662f\u5f00\u6e90\u7684\uff0c\u6211\u628a\u9879\u76ee\u62c9\u4e0b\u6765\u8bd5\u56fe\u5b66\uff08\u767d\uff09\u4e60\uff08\u5ad6\uff09\u522b\u4eba\u7684\u505a\u9898\u601d\u8def\uff0c\u5728\u8fd9\u671f\u95f4\u4e00\u5ea6\u8ba9\u6211\u4ea7\u751f\u4e86\u4e00\u4e2a\u81ea\u6211\u6000\u7591\uff1a<\/p>\n<blockquote><p>\u4ed6\u4eec\u5199\u7684 Java \u548c\u6211\u4f1a\u7684 Java \u662f\u540c\u4e00\u4e2a Java \u5417\uff1f<\/p><\/blockquote>\n<p>\u4e0d\u80fd\u8ba9\u6211\u4e00\u4e2a\u4eba\u6000\u7591\uff0c\u6240\u4ee5\u8fd9\u7bc7\u6587\u7ae0\u6211\u6253\u7b97\u5e26\u4f60\u76d8\u4e00\u4e0b\u8fd9\u4e2a\u6bd4\u8d5b\uff0c\u5e76\u4e14\u8bd5\u56fe\u8ba9\u4f60\u4e5f\u4ea7\u751f\u6000\u7591\u3002<\/p>\n<h2>\u8d5b\u9898<\/h2>\n<p>\u5728 2024 \u5e74 1 \u6708 1 \u65e5\uff0c\u4e00\u4e2a\u53eb\u505a Gunnar Morling \u7684\u5e05\u54e5\uff0c\u53d1\u4e86\u8fd9\u6837\u4e00\u7bc7\u6587\u7ae0\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=ceAECrz1fpzvgzxWzvREog%3D%3D.590NjrRntknVy4P2fn6VWmTGGi%2FdVOCztIarZK%2BZSL0QJ3bj6LCiNWymAgnNJYGNY1iBySqT56XazbudBjTMjw%3D%3D\" rel=\"noopener noreferrer\">https:\/\/www.morling.dev\/blog\/one-billion-row-challenge\/<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679463\" alt=\"\" title=\"\"><\/p>\n<p>\u6587\u7ae0\u7684\u6807\u9898\u53eb\u505a\u300aThe One Billion Row Challenge\u300b\uff0c\u5341\u4ebf\u884c\u6311\u6218\uff0c\u7b80\u79f0\u5c31\u662f 1BRC\uff0c\u6311\u6218\u7684\u65f6\u95f4\u662f\u4e00\u6708\u4efd\u6574\u4e2a\u6708\u3002<\/p>\n<p>\u8d5b\u9898\u7684\u5185\u5bb9\u975e\u5e38\u7b80\u5355\uff0c\u4f60\u53ea\u9700\u8981\u770b\u61c2\u8fd9\u4e2a\u6587\u4ef6\u5c31\u884c\u4e86\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679464\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6587\u4ef6\u7684\u6bcf\u4e00\u884c\u8bb0\u5f55\u7684\u662f\u4e00\u4e2a\u6c14\u8c61\u7ad9\u7684\u6e29\u5ea6\u503c\u3002\u6c14\u8c61\u7ad9\u548c\u6e29\u5ea6\u5206\u53f7\u5206\u9694\uff0c\u6e29\u5ea6\u503c\u53ea\u4f1a\u4fdd\u7559\u4e00\u4f4d\u5c0f\u6570\u3002<\/p>\n<p>\u53c2\u8d5b\u8005\u53ea\u9700\u8981\u89e3\u6790\u8fd9\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u5e76\u8ba1\u7b97\u51fa\u6bcf\u4e2a\u6c14\u8c61\u7ad9\u7684\u6700\u5c0f\u3001\u6700\u5927\u548c\u5e73\u5747\u6e29\u5ea6\u3002\u6309\u7167\u5b57\u5178\u5e8f\u7684\u683c\u5f0f\u8f93\u51fa\u5c31\u884c\u4e86\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679465\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u51fa\u9898\u4eba\u8fd8\u914d\u4e86\u4e00\u4e2a\u7b80\u56fe\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679466\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u9700\u6c42\u975e\u5e38\u660e\u786e\u3001\u7b80\u5355\uff0c\u5bf9\u4e0d\u5bf9\uff1f<\/p>\n<p>\u4e3a\u4e86\u8ba9\u4f60\u5f7b\u5e95\u660e\u767d\uff0c\u6211\u518d\u7ed9\u4f60\u4e3e\u4e00\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50\u3002<\/p>\n<p>\u5047\u8bbe\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<blockquote><p>chengdu;12.0<br \/>guangzhou;7.2;<br \/>chengdu;6.3<br \/>beijing;-3.6;<br \/>chengdu;23.0<br \/>shanghai;9.8;<br \/>chengdu;24.3<br \/>beijing;17.8;<\/p><\/blockquote>\n<p>\u90a3\u4e48 chengdu (\u6210\u90fd)\u7684\u6700\u4f4e\u6c14\u6e29\u662f 6.3\uff0c\u6700\u9ad8\u6c14\u6e29\u662f 24.3\uff0c\u5e73\u5747\u6c14\u6e29\u662f(12.0+6.3+23.0+24.3)\/4=16.4\uff0c\u5c31\u662f\u8fd9\u4e48\u6734\u5b9e\u65e0\u534e\u7684\u8ba1\u7b97\u65b9\u5f0f\u3002<\/p>\n<p>\u6700\u7ec8\u7ed3\u679c\u8f93\u51fa\u7684\u65f6\u5019\uff0c\u518d\u6ce8\u610f\u4e00\u4e0b\u5b57\u5178\u5e8f\u5c31\u884c\u3002<\/p>\n<p>\u8fd9\u6709\u5565\u597d\u6311\u6218\u7684\u5462\uff1f<\/p>\n<p>\u96be\u70b9\u5728\u4e8e\u51fa\u9898\u4eba\u7ed9\u51fa\u7684\u8fd9\u4e2a\u6587\u4ef6\u6709 10 \u4ebf\u884c\u6570\u636e\u3002<\/p>\n<p>\u5728\u6211\u7684\u5783\u573e\u7535\u8111\u4e0a\uff0c\u5149\u662f\u8dd1\u51fa\u9898\u4eba\u63d0\u4f9b\u7684\u6570\u636e\u751f\u6210\u7684\u811a\u672c\uff0c\u5c31\u8dd1\u4e86 20 \u5206\u949f\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679467\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u8dd1\u51fa\u6765\u4e4b\u540e\u6587\u4ef6\u5927\u5c0f\u90fd\u6709\u63a5\u8fd1 13G\uff0c\u8bb0\u4e8b\u672c\u6253\u90fd\u6253\u4e0d\u5f00\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679468\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6240\u4ee5\u6311\u6218\u70b9\u5c31\u5728\u4e8e\u201c\u5341\u4ebf\u884c\u201d\u6570\u636e\u3002<\/p>\n<p>\u5177\u4f53\u7684\u4e00\u4e9b\u89c4\u5219\u63cf\u8ff0\u548c\u7ec6\u8282\u8865\u5145\uff0c\u90fd\u5728 github \u4e0a\u653e\u597d\u4e86\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=BOTKqucTJiRMwZOLF6plkg%3D%3D.L3N0pTz86v8%2BvtXZr4Gayq8SokhOfnAVfXkzkp7AS66Ryc1TjnkMqMv8LAIHYG%2B3\" rel=\"noopener noreferrer\">https:\/\/github.com\/gunnarmorling\/1brc<\/a><\/p><\/blockquote>\n<p>\u9488\u5bf9\u8fd9\u4e2a\u6311\u6218\uff0c\u51fa\u9898\u4eba\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e2a\u57fa\u7ebf\u7248\u672c\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=ZP3LL6GvLzIionYA1f6TXQ%3D%3D.XnYJ6VGO6hEaYpPSevwfSej%2FhMGHEny96TlxEaNlXmZcBR%2FQhoQ1%2FuEaxLMRaEYS%2Fd9RgjSE07YHmYlZoX%2B%2Btb6GHdz5RQ3roZoSNcOtZ1ISLRQ63UjNw9k4fE3qgWFc0f6AjtdMAC17wjNx7CbQqQ%3D%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/gunnarmorling\/1brc\/blob\/main\/src\/main\/java\/dev\/morling\/onebrc\/CalculateAverage_baseline.java<\/a><\/p><\/blockquote>\n<p>\u9996\u5148\u5c01\u88c5\u4e86\u4e00\u4e2a MeasurementAggregator \u5bf9\u8c61\uff0c\u91cc\u9762\u653e\u7684\u5c31\u662f\u8981\u8bb0\u5f55\u7684\u6700\u5c0f\u6e29\u5ea6\u3001\u6700\u5927\u6e29\u5ea6\u3001\u603b\u6e29\u5ea6\u548c\u603b\u6570\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679469\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6574\u4e2a\u6838\u5fc3\u4ee3\u7801\u5c31\u4e8c\u4e09\u5341\u884c\uff0c\u4f7f\u7528\u4e86\u6d41\u5f0f\u7f16\u7a0b\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679470\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u9996\u5148\u662f\u4e00\u884c\u884c\u7684\u8bfb\u53d6\u6587\u672c\uff0c\u63a5\u7740\u6bcf\u4e00\u884c\u90fd\u6309\u7167\u5206\u53f7\u8fdb\u884c\u62c6\u5206\uff0c\u53d6\u51fa\u5bf9\u5e94\u7684\u6c14\u8c61\u7ad9\u548c\u6e29\u5ea6\u503c\u3002<\/p>\n<p>\u7136\u540e\u6309\u7167\u6c14\u8c61\u7ad9\u7ef4\u5ea6\u8fdb\u884c groupingBy \u805a\u5408\uff0c\u5e76\u4e14\u8ba1\u7b97\u6700\u5927\u503c\u3001\u6700\u5c0f\u503c\u548c\u5e73\u5747\u503c\u3002<\/p>\n<p>\u5728\u8ba1\u7b97\u5e73\u5747\u503c\u7684\u65f6\u5019\uff0c\u4e3a\u4e86\u907f\u514d\u6d6e\u70b9\u8ba1\u7b97\uff0c\u8fd8\u7279\u610f\u5c06\u6e29\u5ea6\u4e58 10\uff0c\u8f6c\u6362\u4e3a int \u7c7b\u578b\u3002<\/p>\n<p>\u6700\u540e\u7528 TreeMap \u6309\u5b57\u5178\u5e8f\u8f93\u51fa\u5404\u4e2a\u6c14\u8c61\u7ad9\u7684\u6e29\u5ea6\u6570\u636e\u3002<\/p>\n<p>\u8fd9\u4e2a\u57fa\u7ebf\u7248\u672c\u5b98\u65b9\u7684\u6570\u636e\u662f\u5728\u8dd1\u5206\u73af\u5883\u4e0b\uff0c2 \u5206\u949f\u5185\u53ef\u4ee5\u8fd0\u884c\u5b8c\u6bd5\u3002<\/p>\n<p>\u800c\u5728\u6211\u7684\u7535\u8111\u4e0a\u8dd1\u4e86\u63a5\u8fd1 14 \u5206\u949f\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679471\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5f88\u6b63\u5e38\uff0c\u6bd5\u7adf\u4eba\u5bb6\u7684\u6d4b\u8bc4\u73af\u5883\u914d\u7f6e\u90fd\u662f\u5f88\u9ad8\u7684\uff1a<\/p>\n<blockquote><p>Results are determined by running the program on a Hetzner AX161 dedicated server (32 core AMD EPYC\u2122 7502P (Zen2), 128 GB RAM).<\/p><\/blockquote>\n<p>\u53c2\u52a0\u6311\u6218\u7684\u5404\u8def\u5927\u795e\uff0c\u6700\u7ec8\u62ff\u51fa\u7684 TOP 10 \u6210\u7ee9\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679472\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5f53\u65f6\u770b\u5230\u8fd9\u4e2a\u6210\u7ee9\u7684\u77ac\u95f4\uff0c\u6211\u4eba\u90fd\u662f\u9ebb\u7684\uff0c\u7b2c\u4e00\u4e2a\u7591\u95ee\u662f\uff1a\u6211\u9760\uff0c13G \u7684\u6587\u4ef6\u554a\uff1f1.5s \u5185\u5b8c\u6210\u4e86\u8bfb\u53d6\u3001\u89e3\u6790\u3001\u8ba1\u7b97\u7684\u8fc7\u7a0b\uff1f\u8fd9\u4e0d\u53ef\u80fd\u554a\uff0c\u5149\u662f\u8bfb\u53d6 13G \u5927\u5c0f\u7684\u6587\u4ef6\uff0c\u4e5f\u9700\u8981\u4e00\u70b9\u65f6\u95f4\u5427\uff1f<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679473\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4f46\u662f\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6b6a\u5e08\u5085\u6709\u8fd9\u4e2a\u60f3\u6cd5\u662f\u8d70\u5165\u4e86\u4e00\u4e2a\u5c0f\u8bef\u533a\uff0c\u5c31\u662f\u6211\u4ee5\u4e3a\u8fd9 13G \u7684\u6587\u4ef6\u4e00\u6b21\u6027\u52a0\u8f7d\u4e0d\u5b8c\u6210\uff0c\u600e\u4e48\u5feb\u901f\u7684\u4ece\u786c\u76d8\u628a\u6587\u4ef6\u8bfb\u53d6\u5230\u5185\u5b58\u4e2d\u4e5f\u662f\u4e00\u4e2a\u8003\u70b9\u3002<\/p>\n<p>\u540e\u6765\u53d1\u73b0\u662f\u6211\u591a\u8651\u4e86\uff0c\u4eba\u5bb6\u76f4\u63a5\u5c31\u8bf4\u4e86\uff0c\u4e0d\u7528\u8003\u8651\u8fd9\u4e00\u70b9\uff0c\u8dd1\u5206\u6210\u7ee9\u8fd0\u884c\u7684\u65f6\u5019\uff0c\u6587\u4ef6\u76f4\u63a5\u5c31\u5728\u5185\u5b58\u4e2d\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679474\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6240\u4ee5\uff0c\u6700\u7ec8\u7684\u6210\u7ee9\u4e2d\u4e0d\u5305\u542b\u8bfb\u53d6\u6587\u4ef6\u7684\u65f6\u95f4\u3002<\/p>\n<p>\u4f46\u662f\u4e5f\u5f88\u725b\u903c\u4e86\u554a\uff0c\u6bd5\u7adf\u6709\u5341\u4ebf\u6761\u6570\u636e\u3002<\/p>\n<h2>\u7b2c\u4e00\u540d<\/h2>\n<p>\u6211\u5c1d\u8bd5\u7740\u770b\u4e86\u4e00\u4e0b\u7b2c\u4e00\u540d\u7684\u4ee3\u7801\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=logTZ3okeTWjZ6qMUPFJXA%3D%3D.CcB%2BUUBGVmzNIPH0YAQMXwkL4Epn6RTnSPaFkEafBfsOnfvyvQHmisHgP%2BXoHJ5Y53j10OxgXCrZwKOJgF2%2B6vmp1bhG%2BOR3LFyoDwqenPF73bxcv63bu5lYeE0NCr3EmqxYbAhBfzJeodKRjclAtZJF6N%2FAWq%2B2kkpSpJzS6U0%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/gunnarmorling\/1brc\/blob\/main\/src\/main\/java\/dev\/morling\/onebrc\/CalculateAverage_thomaswue.java<\/a><\/p><\/blockquote>\n<p>\u8fc7\u4e8e\u786c\u6838\uff0c\u5b9e\u5728\u662f\u770b\u4e0d\u61c2\u3002\u6211\u53ea\u80fd\u901a\u8fc7\u4f5c\u8005\u5199\u7684\u4e00\u70b9\u6ce8\u91ca\u3001\u65b9\u6cd5\u540d\u79f0\u3001\u4ee3\u7801\u63d0\u4ea4\u8bb0\u5f55\u53bb\u5c1d\u8bd5\u7406\u89e3\u4ed6\u7684\u4ee3\u7801\u3002<\/p>\n<p>\u5728\u4ed6\u7684\u4ee3\u7801\u5f00\u5934\u7684\u90e8\u5206\uff0c\u6709\u8fd9\u6837\u7684\u4e00\u6bb5\u63cf\u8ff0\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679475\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u8fd9\u662f\u4ed6\u7684\u7834\u9898\u601d\u8def\uff0c\u7ed3\u5408\u4e86\u8fd9\u4e9b\u4fe1\u606f\u4e4b\u540e\u518d\u53bb\u770b\u4ee3\u7801\uff0c\u7a0d\u5fae\u597d\u4e00\u70b9\uff0c\u4f46\u662f\u6211\u53d1\u73b0\u4ed6\u91cc\u9762\u8fd8\u662f\u6709\u975e\u5e38\u591a\u7684\u5fae\u64cd\u3001\u592a\u591a\u9488\u5bf9\u6027\u7684\u4f18\u5316\u5bfc\u81f4\u4ee3\u7801\u53ef\u8bfb\u6027\u8f83\u5dee\uff0c\u867d\u7136\u4ed6\u7684\u4ee3\u7801\u52a0\u4e0a\u6ce8\u91ca\u4e00\u5171\u4e5f\u624d 400 \u591a\u884c\uff0c\u7136\u800c\u6211\u770b\u8fd8\u662f\u770b\u4e0d\u61c2\u3002<\/p>\n<p>\u6211\u968f\u4fbf\u622a\u4e2a\u4ee3\u7801\u7247\u6bb5\u5427\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679476\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u95ee GPT \u8fd9\u4e2a\u54e5\u4eec\uff0c\u4ed6\u4e5f\u662f\u80fd\u8bf4\u4e2a\u5927\u6982\u51fa\u6765\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679477\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6240\u4ee5\u6211\u653e\u5f03\u4e86\u7406\u89e3\u7b2c\u4e00\u540d\u7684\u4ee3\u7801\uff0c\u5f00\u59cb\u53bb\u770b\u7b2c\u4e8c\u540d\uff0c\u53d1\u73b0\u4e5f\u662f\u975e\u5e38\u7684\u6666\u6da9\u96be\u61c2\uff0c\u518d\u5230\u7b2c\u4e09\u540d&#8230;<\/p>\n<p>\u6700\u540e\uff0c\u6211\u4ea7\u751f\u4e86\u6587\u7ae0\u5f00\u59cb\u65f6\u7684\u7591\u95ee\uff1a\u4ed6\u4eec\u5199\u7684 Java \u548c\u6211\u4f1a\u7684 Java \u662f\u540c\u4e00\u4e2a Java \u5417\uff1f<\/p>\n<p>\u4f46\u662f\u6709\u4e00\u8bf4\u4e00\uff0c\u867d\u7136\u6211\u770b\u4e0d\u61c2\u4ed6\u4eec\u7684\u67d0\u4e9b\u64cd\u4f5c\uff0c\u4f46\u662f\u4f1a\u53d1\u73b0\u4ed6\u4eec\u6574\u4f53\u7684\u601d\u8def\u90fd\u51e0\u4e4e\u662f\u4e00\u81f4\u3002<\/p>\n<p>\u867d\u7136\u6211\u6ca1\u6709\u770b\u61c2\u7b2c\u4e00\u540d\u7684\u4ee3\u7801\uff0c\u4f46\u662f\u6211\u8fd8\u662f\u4e13\u95e8\u5217\u51fa\u4e86\u8fd9\u4e00\u4e2a\u5c0f\u8282\uff0c\u7ed9\u4f60\u6307\u4e2a\u8def\uff0c\u6709\u5174\u8da3\u4f60\u53ef\u4ee5\u53bb\u770b\u770b\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u83b7\u5f97\u7b2c\u4e00\u540d\u7684\u8001\u54e5\uff0c\u5176\u5b9e\u662f\u4e00\u4e2a\u5de8\u4f6c\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679478\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u662f GraalVM \u9879\u76ee\u7684\u8d1f\u8d23\u4eba\u4e4b\u4e00:<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679479\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>\u5de8\u4eba\u80a9\u8180<\/h2>\n<p>\u5728\u5b98\u65b9\u7684 github \u9879\u76ee\u7684\u6700\u540e\uff0c\u6709\u8fd9\u6837\u7684\u4e00\u4e2a\u90e8\u5206\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679480\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5176\u4e2d\u6700\u540e\u4e00\u7bc7\u6587\u7ae0\uff0c\u662f\u4e00\u4e2a\u53eb\u505a Marko Topolnik \u7684\u8001\u54e5\u5199\u7684\u3002<\/p>\n<p>\u6211\u770b\u4e86\u4e00\u4e0b\uff0c\u8fd9\u4e2a\u54e5\u4eec\u7684\u5b98\u65b9\u6210\u7ee9\u662f 2.332 \u79d2\uff0c\u699c\u5355\u7b2c\u4e5d\u540d\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679481\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4f46\u662f\u6309\u7167\u4ed6\u81ea\u5df1\u7684\u63cf\u8ff0\uff0c\u5728\u6bd4\u8d5b\u7ed3\u675f\u540e\u4ed6\u8fd8\u7ee7\u7eed\u4f18\u5316\u4e86\u4ee3\u7801\uff0c\u6700\u7ec8\u53ef\u4ee5\u8dd1\u5230  1.7s\uff0c\u6392\u540d\u7b2c\u56db\u3002<\/p>\n<p>\u5728\u4ed6\u7684\u6587\u7ae0\u4e2d\u8be6\u7ec6\u7684\u63cf\u8ff0\u4e86\u4ed6\u7684\u6311\u6218\u8fc7\u7a0b\u548c\u601d\u8def\u3002<\/p>\n<p>\u6211\u5c31\u7ad9\u5728\u5de8\u4eba\u7684\u80a9\u8180\u4e0a\uff0c\u5e26\u5927\u5bb6\u770b\u770b\u8fd9\u4f4d\u5927\u4f6c\u4ece 71s \u5230 1.7s \u7684\u7834\u9898\u4e4b\u9053\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=Mf8%2Fh645ntMCJPHPXn1vSA%3D%3D.D2UTdVPzXqfLKoVKJtMx1uFLEs8EpPJaVuwVoU6rDfFQHBBspmXgSmoV%2Ft4MTMRXBtHNYF%2FgS5RAGT39NL0aLA%3D%3D\" rel=\"noopener noreferrer\">https:\/\/questdb.io\/blog\/billion-row-challenge-step-by-step\/<\/a><\/p><\/blockquote>\n<h3>\u6700\u5e38\u89c4\u7684\u4ee3\u7801<\/h3>\n<p>\u9996\u5148\uff0c\u4ed6\u7ed9\u4e86\u4e00\u4e2a\u5e38\u89c4\u5b9e\u73b0\u7684\u4ee3\u7801\uff0c\u548c\u57fa\u7ebf\u7248\u672c\u7684\u4ee3\u7801\u5927\u540c\u5c0f\u5f02\uff0c\u53ea\u4e0d\u8fc7\u662f\u4f7f\u7528\u4e86\u5e76\u884c\u6d41\u6765\u5904\u7406\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=VCooHOOGWXUEAyqbA9BBEw%3D%3D.ygBvpLCvpiC5ri4%2BYpnqWkeXw4rhUPDTTtknHAEJlEvpI5ZgYsLxYtWI6Mk9gcUT2LS3b8aEGGwwvgiYb3CugbB0y35hmXSD%2FdRj9fc6kno%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/mtopolnik\/billion-row-challenge\/blob\/main\/src\/Blog1.java<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679482\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5e73\u65f6\u770b\u5230\u6d41\u5f0f\u7f16\u7a0b\u6211\u662f\u6709\u70b9\u5934\u75bc\u7684\uff0c\u9700\u8981\u7a0d\u5fae\u7684\u53cd\u5e94\u4e00\u4e0b\uff0c\u4f46\u662f\u5728\u770b\u4e86\u524d\u4e09\u540d\u7684\u6700\u7ec8\u4ee3\u7801\u540e\u518d\u770b\u8fd9\u4e2a\u4ee3\u7801\uff0c\u6211\u89c9\u5f97\u5f88\u4eb2\u5207\u3002<\/p>\n<p>\u6839\u636e\u4f5c\u8005\u7684\u63cf\u8ff0\uff0c\u8fd9\u6bb5\u4ee3\u7801\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u5e76\u884c Java \u6d41\uff0c\u5c06\u6240\u6709 CPU \u6838\u5fc3\u90fd\u7528\u8d77\u6765\u4e86\u3002<\/li>\n<li>\u4e5f\u4e0d\u4f1a\u9677\u5165\u4efb\u4f55\u5df2\u77e5\u7684\u6027\u80fd\u9677\u9631\uff0c\u6bd4\u5982 Java \u6b63\u5219\u8868\u8fbe\u5f0f<\/li>\n<\/ul>\n<p>\u5728\u4e00\u53f0\u88c5\u6709 OpenJDK 21.0.2 \u7684 Hetzner CCX33 \u673a\u5668\u4e0a\uff0c\u8dd1\u5b8c\u9700\u8981\u7684\u65f6\u95f4\u4e3a 71 \u79d2\u3002<\/p>\n<h3>\u7b2c 0 \u7248\u4f18\u5316\uff1a\u6362\u4e2a\u597d\u7684 JVM<\/h3>\n<p>\u53eb\u505a\u7b2c 0 \u7248\u4f18\u5316\u7684\u539f\u56e0\u662f\u4f5c\u8005\u5bf9\u4e8e\u4ee3\u7801\u5176\u5b9e\u5565\u4e5f\u6ca1\u52a8\uff0c\u53ea\u662f\u6362\u4e86\u4e00\u4e2a JVM\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679483\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u9ed8\u8ba4\u4f7f\u7528 GraalVM \u4e4b\u540e\uff0c\u6700\u5e38\u89c4\u7684\u4ee3\u7801\uff0c\u8fd0\u884c\u65f6\u95f4\u4ece 71s \u5230\u4e86 66s\uff0c\u76f8\u5f53\u4e8e\u767d\u6361\u4e86 5s\uff0c\u6211\u95ee\u5c31\u4f60\u9999\u4e0d\u9999\u3002<\/p>\n<p>\u540c\u65f6\u4f5c\u8005\u8fd8\u63d0\u5230\u4e00\u53e5\u8bdd\uff1a<\/p>\n<blockquote><p>When we get deeper into optimizing and bring down the runtime to 2-3 seconds, eliminating the JVM startup provides another 150-200ms in relief. That becomes a big deal.<\/p><\/blockquote>\n<p>\u5f53\u6211\u4eec\u628a\u7a0b\u5e8f\u4f18\u5316\u5230\u8fd0\u884c\u65f6\u95f4\u53ea\u9700\u8981 2-3 \u79d2\u7684\u65f6\u5019\uff0c\u4f7f\u7528 GraalVM\uff0c\u4f1a\u6d88\u9664 JVM \u7684\u542f\u52a8\u65f6\u95f4\uff0c\u4ece\u800c\u63d0\u4f9b\u989d\u5916\u7684 150-200ms \u7684\u63d0\u5347\u3002<\/p>\n<p>\u5230\u90a3\u4e2a\u65f6\u5019\uff0c\u8fd9\u4e2a\u5c31\u53d8\u5f97\u975e\u5e38\u91cd\u8981\u4e86\u3002<\/p>\n<h3>\u6570\u636e\u6307\u6807\u5f88\u91cd\u8981<\/h3>\n<p>\u5728\u6b63\u5f0f\u8fdb\u5165\u4f18\u5316\u4e4b\u524d\uff0c\u4f5c\u8005\u5148\u4ecb\u7ecd\u4e86\u4ed6\u4f7f\u7528\u5230\u7684\u4e09\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u5de5\u5177\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679484\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5173\u4e8e\u5de5\u5177\u6211\u5c31\u4e0d\u8fc7\u591a\u4ecb\u7ecd\u4e86\uff0c\u8fd9\u91cc\u5355\u72ec\u63d0\u4e00\u5634\u4e3b\u8981\u662f\u60f3\u8868\u8fbe\u4e00\u4e2a\u8d2f\u7a7f\u6574\u4e2a\u4f18\u5316\u8fc7\u7a0b\u7684\u4e2d\u5fc3\u601d\u60f3\uff1a\u6570\u636e\u6307\u6807\u5f88\u91cd\u8981\u3002<\/p>\n<p>\u4f60\u53ea\u6709\u6536\u96c6\u5230\u4e86\u5f53\u524d\u7a0b\u5e8f\u8db3\u591f\u591a\u7684\u8fd0\u884c\u6307\u6807\uff0c\u624d\u80fd\u5bf9\u4f60\u8fdb\u884c\u4e0b\u4e00\u6b65\u4f18\u5316\u65f6\u63d0\u4f9b\u76f4\u89c2\u7684\u3001\u4f18\u5316\u65b9\u5411\u4e0a\u7684\u6307\u5bfc\u3002<\/p>\n<p>\u5de5\u6b32\u5584\u5176\u4e8b\u5fc5\u5148\u5229\u5176\u5668\uff0c\u5c31\u662f\u8fd9\u4e2a\u9053\u7406\u3002<\/p>\n<h3>\u7b2c\u4e00\u7248\u4f18\u5316\uff1a\u5e76\u884c I\/O \u641e\u8d77\u6765<\/h3>\n<p>\u901a\u8fc7\u67e5\u770b\u5f53\u524d\u4ee3\u7801\u5bf9\u5e94\u7684\u706b\u7130\u56fe\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=XRfPgNBTFLK2V78MNWHvZA%3D%3D.RCE20k034AP1850Wp3O8vj355yUL9PH2dfYyhWauQWhZLm%2F1aLm1peDgp12MapUc\" rel=\"noopener noreferrer\">https:\/\/questdb.io\/html\/blog\/profile-blog1<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679485\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u901a\u8fc7\u706b\u7130\u56fe\u4ee5\u53ca\u89c2\u5bdf GC \u60c5\u51b5\uff0c\u4f5c\u8005\u53d1\u73b0\u5f53\u524d\u8017\u65f6\u7684\u5730\u65b9\u6ce8\u610f\u662f\u8fd9\u4e09\u4e2a\u5730\u65b9\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679486\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<ol>\n<li>BufferedReader \u5c06\u6bcf\u884c\u6587\u672c\u8f93\u51fa\u4e3a\u5b57\u7b26\u4e32<\/li>\n<li>\u5904\u7406\u6bcf\u4e00\u884c\u7684\u5b57\u7b26\u4e32<\/li>\n<li>\u5783\u573e\u6536\u96c6 (GC)\uff1a\u4f7f\u7528 VisualGC \u53ef\u4ee5\u770b\u5230\uff0c\u5dee\u4e0d\u591a\u6bcf\u79d2\u8981 GC 10 \u6b21\u751a\u81f3\u66f4\u591a\u3002<\/li>\n<\/ol>\n<p>\u53ef\u4ee5\u53d1\u73b0 BufferedReader \u5360\u7528\u4e86\u5927\u91cf\u7684\u6027\u80fd\uff0c\u56e0\u4e3a\u5f53\u524d\u8bfb\u53d6\u6587\u4ef6\u8fd8\u662f\u4e00\u884c\u884c\u8bfb\u53d6\u7684\u561b\uff0c\u6027\u80fd\u5f88\u5dee\u3002<\/p>\n<p>\u4e8e\u662f\u5927\u591a\u6570\u4eba\u610f\u8bc6\u5230\u7684\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u91c7\u7528\u5e76\u884c\u5316 I\/O\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u6211\u4eec\u9700\u8981\u628a\u5f85\u5904\u7406\u7684\u6587\u4ef6\u5206\u5757\u3002\u5206\u591a\u5c11\u5757\u5462\uff1f<\/p>\n<p>\u6709\u591a\u5c11\u4e2a\u7ebf\u7a0b\u5c31\u5206\u6210\u591a\u5c11\u4e2a\u5757\uff0c\u6bcf\u4e2a\u7ebf\u7a0b\u5404\u81ea\u5904\u7406\u4e00\u4e2a\u5757\uff0c\u8fd9\u6837\u6027\u80fd\u5c31\u4e0a\u53bb\u4e86\u3002<\/p>\n<p>\u6587\u4ef6\u5206\u5757\u8bfb\u53d6\uff0c\u5927\u5bb6\u81ea\u7136\u800c\u7136\u7684\u5c31\u60f3\u5230\u4e86 mmap \u76f8\u5173\u7684\u65b9\u6cd5\u3002<\/p>\n<p>mmap \u53ef\u4ee5\u7528 ByteBuffer API \u6765\u641e\u4e8b\u60c5\uff0c\u4f46\u662f\u4f7f\u7528\u7684\u7d22\u5f15\u662f int \u7c7b\u578b\uff0c\u6240\u4ee5\u53ef\u6620\u5c04\u7684\u5927\u5c0f\u6709 2GB \u7684\u9650\u5236\u3002<\/p>\n<p>\u524d\u9762\u8bf4\u4e86\uff0c\u5728\u8fd9\u4e2a\u6311\u6218\u4e2d\uff0c\u5149\u662f\u6587\u4ef6\u5927\u5c0f\u5c31\u6709 13G\uff0c\u6240\u4ee5 2GB \u662f\u6349\u895f\u89c1\u8098\u7684\u3002<\/p>\n<p>\u4f46\u662f\u5728 JDK 21 \u4e2d\uff0c\u652f\u6301\u4e00\u4e2a\u53eb\u505a MemorySegment \u7684\u4e1c\u897f\uff0c\u4e5f\u53ef\u4ee5\u5e72 mmap  \u4e00\u6837\u7684\u4e8b\u60c5\uff0c\u4f46\u662f\u5b83\u7684\u7d22\u5f15\u4f7f\u7528\u7684\u662f long\uff0c\u76f8\u5f53\u4e8e\u6ca1\u6709\u5185\u5b58\u9650\u5236\u4e86\u3002<\/p>\n<p>\u9664\u4e86\u4f7f\u7528 MemorySegment \u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u7ec6\u8282\u7684\u5904\u7406\uff0c\u6bd4\u5982\u627e\u5230\u6b63\u786e\u7684\u5206\u5272\u6587\u4ef6\u7684\u4f4d\u7f6e\u3001\u542f\u52a8\u7ebf\u7a0b\u3001\u7b49\u5f85\u7ebf\u7a0b\u5904\u7406\u5b8c\u6210\u7b49\u7b49\u3002<\/p>\n<p>\u5904\u7406\u8fd9\u4e9b\u7ec6\u8282\u4f1a\u5bfc\u81f4\u8fd9\u4e00\u7248\u7684\u4ee3\u7801\u4ece\u6700\u521d\u7684 17 \u884c\u589e\u52a0\u5230\u4e86 120 \u884c\u3002<\/p>\n<p>\u8fd9\u662f\u4f18\u5316\u540e\u7684\u4ee3\u7801\u5730\u5740\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=rlr4G7%2FZtskD4Q6jQMuPyQ%3D%3D.wEpB4grlOGScbc7uAwa1uLN0%2BulHp9JA7yM3cAq6qJq7jap7fybLaVpnyLEHHMpmTDGukRLp5W31xRsebl2yrFKpSm%2BKVsSFlV3IbtsPXNw%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/mtopolnik\/billion-row-challenge\/blob\/main\/src\/Blog2.java<\/a><\/p><\/blockquote>\n<p>\u5728\u8fd9\u4e2a\u8d5b\u9898\u4e0b\uff0c\u6211\u4eec\u80af\u5b9a\u662f\u9700\u8981\u518d\u5faa\u73af\u4e2d\u8fdb\u884c\u6570\u636e\u7684\u89e3\u6790\u548c\u5904\u7406\u7684\uff0c\u6240\u4ee5\u5faa\u73af\u5c31\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u4e2a\u70b9\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u5173\u6ce8\u4e00\u4e0b\u4ee3\u7801\u4e2d\u7684\u5faa\u73af\u90e8\u5206\uff0c\u8fd9\u91cc\u9762\u6709\u4e00\u4e2a\u5c0f\u7ec6\u8282\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679487\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u8fd9\u4e2a\u5faa\u73af\u662f\u6bcf\u4e2a\u7ebf\u7a0b\u5728\u6309\u5757\u8bfb\u53d6\u6587\u4ef6\u5927\u5c0f\uff0c\u91cc\u9762\u7528\u5230\u4e86 findByte \u65b9\u6cd5\u548c stringAt \u65b9\u6cd5\u3002<\/p>\n<p>\u5728\u7b2c\u4e00\u4e2a\u7248\u672c\u4e2d\uff0c\u6211\u4eec\u662f\u7528\u7684 BufferedReader \u628a\u4e00\u884c\u5185\u5bb9\u4ee5\u5b57\u7b26\u4e32\u7684\u5f62\u5f0f\u8bfb\u8fdb\u6765\uff0c\u7136\u540e\u6309\u7167\u5206\u53f7\u5206\u9694\uff0c\u5e76\u751f\u6210\u57ce\u5e02\u548c\u6e29\u5ea6\u4e24\u4e2a\u5b57\u7b26\u4e32\u3002<\/p>\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u5c31\u6d89\u53ca\u5230\u4e09\u4e2a\u5b57\u7b26\u4e32\u4e86\u3002<\/p>\n<p>\u4f46\u662f\u8fd9\u4e2a\u54e5\u4eec\u7684\u601d\u8def\u662f\u5565\uff1f<\/p>\n<p>\u81ea\u5b9a\u4e49\u4e00\u4e2a findByte \u65b9\u6cd5\uff0c\u5148\u627e\u5230\u5206\u53f7\u7684\u4f4d\u7f6e\uff0c\u7136\u540e\u628a\u4e0b\u6807\u8fd4\u56de\u56de\u53bb\u3002<\/p>\n<p>\u518d\u7528\u81ea\u5b9a\u4e49\u7684 stringAt \u65b9\u6cd5\uff0c\u7ed3\u5408\u524d\u9762\u627e\u5230\u7684\u4e0b\u6807\uff0c\u76f4\u63a5\u89e3\u6790\u51fa\u201c\u57ce\u5e02\u548c\u6e29\u5ea6\u201d\u8fd9\u4e24\u4e2a\u5b57\u7b26\u4e32\uff0c\u51cf\u5c11\u4e86\u6574\u884c\u8bfb\u53d6\u7684\u5185\u5b58\u6d88\u8017\u3002<\/p>\n<p>\u76f8\u5f53\u4e8e\u5c11\u4e86\u5341\u4ebf\u4e2a\u5b57\u7b26\u4e32\uff0c\u5728\u5b57\u7b26\u4e32\u5904\u7406\u548c GC \u65b9\u9762\u53d6\u5f97\u4e86\u4e0d\u9519\u7684\u8868\u73b0\u3002<\/p>\n<p>\u8fd9\u4e00\u6ce2\u64cd\u4f5c\u4e0b\u6765\uff0c\u5904\u7406\u65f6\u95f4\u76f4\u63a5\u4ece 66s \u4e0b\u964d\u5230\u4e86 17s\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679488\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u7136\u540e\u518d\u770b\u706b\u7130\u56fe\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=OZeaViJPwQp2tPLLKruqtg%3D%3D.mj8ltGfzVjQ81SfXjcFU5tks%2FrsXNYujiBd4qoWbQIN9ncYG%2FpDyLWSIZWWZyfM4P32Zpfbz2%2BvT3CoLwDIRFg%3D%3D\" rel=\"noopener noreferrer\">https:\/\/questdb.io\/html\/blog\/profile-blog2-variant1<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679489\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u53ef\u4ee5\u53d1\u73b0 GC \u7684\u65f6\u95f4\u51e0\u4e4e\u6d88\u5931\u4e86\u3002<\/p>\n<p>CPU \u73b0\u5728\u5927\u90e8\u5206\u65f6\u95f4\u90fd\u82b1\u5728\u81ea\u5b9a\u4e49\u7684 stringAt \u4e0a\u3002\u8fd8\u6709\u76f8\u5f53\u591a\u7684\u65f6\u95f4\u82b1\u5728 Map.computeIfAbsent \u65b9\u6cd5 \u3001Double.parseDouble \u65b9\u6cd5\u548c findByte \u65b9\u6cd5<\/p>\n<p>\u5176\u4e2d Double.parseDouble \u65b9\u6cd5\u662f\u89e3\u6790\u6e29\u5ea6\u7528\u7684\u3002<\/p>\n<p>\u4f5c\u8005\u6253\u7b97\u5148\u628a\u8fd9\u4e2a\u5730\u65b9\u7ed9\u653b\u4e0b\u6765\u3002<\/p>\n<h3>\u7b2c\u4e8c\u7248\u4f18\u5316\uff1a\u4f18\u5316\u6e29\u5ea6\u89e3\u6790\u65b9\u6cd5<\/h3>\n<p>\u5728\u8fd9\u7248\u4f18\u5316\u4e2d\uff0c\u4f5c\u8005\u76f4\u63a5\u5c06\u6e29\u5ea6\u89e3\u6790\u4e3a\u6574\u6570\u3002<\/p>\n<p>\u9996\u5148\uff0c\u76ee\u524d\u7684\u505a\u6cd5\u662f\uff0c\u9996\u5148\u5206\u914d\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u5bf9\u5176\u8c03\u7528 parseDouble() \u65b9\u6cd5\uff0c\u6700\u540e\u8f6c\u6362\u4e3a\u6574\u6570\u4ee5\u8fdb\u884c\u9ad8\u6548\u7684\u5b58\u50a8\u548c\u8ba1\u7b97\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u5176\u5b9e\u6211\u4eec\u5e94\u8be5\u76f4\u63a5\u521b\u5efa\u6574\u6570\u51fa\u6765\uff0c\u6ca1\u5fc5\u8981\u8d70\u5b57\u7b26\u4e32\u7ed5\u4e00\u5708\u3002<\/p>\n<p>\u540c\u65f6\u6211\u4eec\u77e5\u9053\uff0c\u6e29\u5ea6\u7684\u53d6\u503c\u8303\u56f4\u662f [-99.9,99.9]\uff0c\u6240\u4ee5\u9488\u5bf9\u8fd9\u4e2a\u8303\u56f4\uff0c\u6211\u4eec\u641e\u4e2a\u81ea\u5b9a\u4e49\u65b9\u6cd5\u5c31\u884c\u4e86\uff1a<\/p>\n<pre><code>private int parseTemperature(long semicolonPos) {\n    long off = semicolonPos + 1;\n    int sign = 1;\n    byte b = chunk.get(JAVA_BYTE, off++);\n    if (b == '-') {\n        sign = -1;\n        b = chunk.get(JAVA_BYTE, off++);\n    }\n    int temp = b - '0';\n    b = chunk.get(JAVA_BYTE, off++);\n    if (b != '.') {\n        temp = 10 * temp + b - '0';\n        \/\/ we found two integer digits. The next char is definitely '.', skip it:\n        off++;\n    }\n    b = chunk.get(JAVA_BYTE, off);\n    temp = 10 * temp + b - '0';\n    return sign * temp;\n}<\/code><\/pre>\n<p>\u8fd9\u6ce2\u64cd\u4f5c\u4e0b\u6765\uff0c\u5904\u7406\u65f6\u95f4\u53c8\u51cf\u5c11\u4e86 6s\uff0c\u6765\u5230\u4e86 11s\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679490\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u518d\u770b\u5bf9\u5e94\u706b\u7130\u56fe\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=nrJFDjwWOkGUFHmvlA5%2FCQ%3D%3D.iuRqbJHPdljn67Yy2GISpWR2ezkpvMCgIDxlszpABsyplQ9%2Bw2baH1az4Rz3ZrzAOBJi1lYh%2ByQucYnF22Zbcg%3D%3D\" rel=\"noopener noreferrer\">https:\/\/questdb.io\/html\/blog\/profile-blog2-variant2<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679491\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6e29\u5ea6\u89e3\u6790\u90e8\u5206\u7684\u8017\u65f6\u5360\u6bd4\u4ece 21.43% \u964d\u4f4e\u5230 6%\uff0c\u8bf4\u660e\u662f\u4e00\u6b21\u6b63\u786e\u7684\u4f18\u5316\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u53ef\u4ee5\u518d\u641e\u4e00\u641e stringAt \u65b9\u6cd5\u4e86\u3002<\/p>\n<h3>\u7b2c\u4e09\u7248\u4f18\u5316\uff1a\u81ea\u5b9a\u4e49\u54c8\u5e0c\u8868<\/h3>\n<p>\u9996\u5148\uff0c\u8981\u4f18\u5316 stringAt \u65b9\u6cd5\uff0c\u6211\u4eec\u5f97\u77e5\u9053\u5b83\u662f\u5e72\u5565\u7684\u3002<\/p>\n<p>\u6211\u4eec\u770b\u4e00\u773c\u4ee3\u7801\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679492\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5728\u7ecf\u5386\u4e86\u4e0a\u4e00\u6ce2\u4f18\u5316\u4e4b\u540e\uff0cstringAt \u76ee\u524d\u5728\u4ee3\u7801\u4e2d\u7684\u552f\u4e00\u4f5c\u7528\u5c31\u662f\u4e3a\u4e86\u83b7\u53d6\u6c14\u8c61\u7ad9\u7684\u540d\u79f0\u3002<\/p>\n<p>\u800c\u83b7\u53d6\u5230\u8fd9\u4e2a\u540d\u79f0\u7684\u552f\u4e00\u76ee\u7684\u662f\u770b\u770b\u5f53\u524d\u7684 HashMap \u4e2d\u6709\u6ca1\u6709\u8fd9\u4e2a\u6c14\u8c61\u7ad9\u7684\u6570\u636e\uff0c\u5982\u679c\u6ca1\u6709\u5c31\u65b0\u5efa\u4e00\u4e2a StationStats \u5bf9\u8c61\uff0c\u5982\u679c\u6709\u5c31\u628a\u4e4b\u524d\u7684 StationStats \u5bf9\u8c61\u62ff\u51fa\u6765\u8fdb\u884c\u6570\u636e\u7ef4\u62a4\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u5728\u8d5b\u9898\u4e2d\u8fd8\u6709\u8fd9\u6837\u7684\u4e00\u4e2a\u4fe1\u606f\uff0c\u867d\u7136\u6709\u5341\u4ebf\u884c\u6570\u636e\uff0c\u4f46\u662f\u53ea\u6709 413 \u4e2a\u6c14\u8c61\u7ad9\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679493\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u65e2\u7136 key \u7684\u5927\u5c0f\u662f\u53ef\u63a7\u7684\uff0c\u90a3\u57fa\u4e8e\u8fd9\u4e2a\u6761\u4ef6\uff0c\u4f5c\u8005\u60f3\u4e86\u4e00\u4e2a\u4ec0\u4e48\u6837\u7684\u9a9a\u64cd\u4f5c\u5462\uff1f<\/p>\n<p>\u4ed6\u76f4\u63a5\u4e0d\u7528 HashMap \u4e86\uff0c\u81ea\u5b9a\u4e49\u4e86\u4e00\u4e2a\u54c8\u5e0c\u8868\uff0c\u957f\u8fd9\u6837\u7684\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=7catY3lPWi8Vy%2F4Jz%2FuLuw%3D%3D.66NzVpifJg0Otxfxd3FPMAqE%2FQHZv9V6zsAIi9CS2rKNUyacRnWtI4utFjNIU%2F%2BgSEJRYhwPfJBTfjtWPNPi6ACOgubgJVmPnk3nQMDIDVA%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/mtopolnik\/billion-row-challenge\/blob\/main\/src\/Blog3.java<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679494\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4e3b\u8981\u770b\u4e00\u4e0b\u4ee3\u7801\u4e2d\u7684 findAcc \u65b9\u6cd5\uff0c\u4f60\u5c31\u80fd\u660e\u767d\u5b83\u662f\u5e72\u5565\u7684\u4e86\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679495\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u901a\u8fc7 hash \u65b9\u6cd5\u8ba1\u7b97\u51fa\u6307\u5b9a\u5b57\u7b26\u4e32\uff0c\u5373\u6c14\u8c61\u7ad9\u540d\u79f0\u7684 hash \u503c\u4e4b\u540e\uff0c\u4ece\u81ea\u5b9a\u4e49\u7684 hashtable \u4e2d\u53d6\u51fa\u8be5\u4f4d\u7f6e\u7684\u6570\u636e\u3002<\/p>\n<p>\u9996\u5148\u6807\u53f7\u4e3a \u2460 \u7684\u5730\u65b9\uff0c\u5982\u679c\u6ca1\u6709\u53d6\u5230\u6570\u636e\uff0c\u5219\u8bf4\u660e\u6ca1\u6709\u8fd9\u4e2a\u6c14\u8c61\u7ad9\u7684\u6570\u636e\uff0c\u65b0\u5efa\u4e00\u4e2a\u653e\u597d\uff0c\u8fd4\u56de\u5c31\u5b8c\u4e8b\u3002<\/p>\n<p>\u5982\u679c\u53d6\u5230\u4e86\u6570\u636e\uff0c\u6765\u5230\u6807\u53f7\u4e3a \u2461 \u7684\u5730\u65b9\uff0c\u770b\u770b\u53d6\u5230\u7684\u6570\u636e\u548c\u5f53\u524d\u8981\u653e\u7684\u6570\u636e\u5bf9\u5e94\u7684\u6c14\u8c61\u7ad9\u540d\u79f0\u662f\u4e0d\u662f\u4e00\u6837\u7684\u3002<\/p>\n<p>\u5982\u679c\u662f\u5219\u8bf4\u660e\u5df2\u7ecf\u6709\u4e86\uff0c\u53d6\u51fa\u6765\uff0c\u7136\u540e\u8fd4\u56de\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u662f\uff0c\u8bf4\u660e\u5565\u60c5\u51b5\uff1f<\/p>\n<p>\u8bf4\u660e hash \u51b2\u7a81\u4e86\uff0c\u6765\u5230\u6807\u53f7\u4e3a \u2462 \u7684\u5730\u65b9\u8fdb\u884c\u4e0b\u6807\u52a0\u4e00\u7684\u52a8\u4f5c\u3002<\/p>\n<p>\u7136\u540e\u518d\u6b21\u8fdb\u884c\u5faa\u73af\u3002<\/p>\n<p>\u6765\uff0c\u4f60\u544a\u8bc9\u6211\uff0c\u8fd9\u662f\u4ec0\u4e48\u624b\u6cd5\uff1f<\/p>\n<p>\u8fd9\u4e0d\u5c31\u662f\u5f00\u653e\u5bfb\u5740\u6765\u89e3\u51b3 hash \u51b2\u7a81\u5417\uff1f<\/p>\n<p>\u6240\u4ee5 findAcc \u65b9\u6cd5\uff0c\u5c31\u53ef\u4ee5\u66ff\u4ee3 computeIfAbsent \u65b9\u6cd5\u3002<\/p>\n<p>\u901a\u8fc7\u81ea\u5b9a\u4e49\u7684 StatsAcc \u54c8\u5e0c\u8868\u6765\u4ee3\u66ff\u539f\u751f\u7684 HashMap\u3002<\/p>\n<p>\u800c\u4e14\u524d\u9762\u8bf4\u4e86\uff0ckey \u7684\u5927\u5c0f\u662f\u53ef\u63a7\u7684\uff0c\u5982\u679c\u81ea\u5b9a\u4e49 hash \u8868\u7684\u521d\u59cb\u5316\u5927\u5c0f\u63a7\u5236\u7684\u5408\u9002\uff0c\u90a3\u4e48\u6574\u4e2a hash \u51b2\u7a81\u7684\u60c5\u51b5\u4e5f\u4e0d\u4f1a\u975e\u5e38\u4e25\u91cd\u3002<\/p>\n<p>\u8fd9\u4e00\u6ce2\u7ec4\u5408\u62f3\u4e0b\u6765\uff0c\u8fd0\u884c\u65f6\u95f4\u6765\u5230\u4e86 6.6s\uff0c\u706b\u7130\u56fe\u53d8\u6210\u4e86\u8fd9\u6837\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=ib6kqKu%2F1P4afMq%2BywsHnQ%3D%3D.IqqN0KLras0lyvCv2T9eFDG1p8dekBlJcmEMp23PfrIiQZvwvO73JmFsF9pCRIkq\" rel=\"noopener noreferrer\">https:\/\/questdb.io\/html\/blog\/profile-blog3<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679496\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5927\u91cf\u7684\u65f6\u95f4\u82b1\u5728\u4e86\u524d\u9762\u5206\u6790\u7684 findAcc \u65b9\u6cd5\u4e0a\u3002<\/p>\n<p>\u540c\u65f6\u4f5c\u8005\u63d0\u5230\u4e86\u8fd9\u6837\u4e00\u53e5\u8bdd\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679497\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u540c\u6837\u7684\u4ee3\u7801\uff0c\u5982\u679c\u653e\u5230 OpenJDK \u4e0a\u8dd1\u9700\u8981\u8fd0\u884c 9.6s\uff0c\u6bd4 GraalVM \u6162\u4e86 3.3s\u3002<\/p>\n<p>\u6211\u6ef4\u4e2a\u4e56\u4e56\uff0c\u8fd9\u5c31\u662f\u4e00\u4e2a 45% \u7684\u6027\u80fd\u63d0\u5347\u554a\u3002<\/p>\n<h3>\u7b2c\u56db\u7248\u4f18\u5316\uff1a\u4f7f\u7528 Unsafe \u548c SWAR<\/h3>\n<p>\u5728\u8fd9\u4e00\u7248\u4f18\u5316\u5f00\u59cb\u4e4b\u524d\uff0c\u4f5c\u8005\u5148\u5199\u4e86\u8fd9\u6837\u4e00\u6bb5\u8bdd\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679498\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5927\u6982\u610f\u601d\u5c31\u662f\u8bf4\uff0c\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u7528\u5230\u7684\u90fd\u662f\u5e38\u89c4\u4e14\u6709\u6548\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u5e76\u4e14\u662f Java \u6807\u51c6\u3001\u5b89\u5168\u7684\u7528\u6cd5\u3002<\/p>\n<p>\u5373\u4f7f\u6b62\u6b65\u4e8e\u6b64\u4e5f\u80fd\u5b66\u5230\u5f88\u591a\u4f18\u5316\u6280\u5de7\uff0c\u53ef\u4ee5\u5728\u5b9e\u9645\u7684\u9879\u76ee\u4e2d\u8fdb\u884c\u4f7f\u7528\u3002<\/p>\n<p>\u5982\u679c\u4f60\u7ee7\u7eed\u5f80\u4e0b\u63a2\u7d22\uff0c\u90a3\u4e48\uff1a<\/p>\n<blockquote><p>Readability and maintainability also take a big hit, while providing diminishing returns in performance. But, a challenge is a challenge, and the contestants pressed on without looking back!<br \/>\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u4e5f\u4f1a\u53d7\u5230\u91cd\u521b\uff0c\u540c\u65f6\u6027\u80fd\u7684\u6536\u76ca\u4f1a\u9012\u51cf\u3002\u4f46\u662f\uff0c\u6311\u6218\u5c31\u662f\u6311\u6218\uff0c\u53c2\u8d5b\u8005\u4eec\u7ee7\u7eed\u52aa\u529b\uff0c\u6ca1\u6709\u56de\u5934\uff01<\/p><\/blockquote>\n<p>\u7b80\u5355\u6765\u8bf4\uff0c\u4f5c\u8005\u7684\u610f\u601d\u5c31\u662f\u6253\u4e2a\u9884\u9632\u9488\uff1a\u63a5\u4e0b\u6765\u5c31\u8981\u5f00\u59cb\u4e0a\u5f3a\u5ea6\u4e86\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u5728\u8fd9\u4e2a\u7248\u672c\u4e2d\uff0c\u4f5c\u8005\u5e94\u7528\u4e00\u4e9b\u6392\u540d\u9760\u524d\u7684\u9009\u4e0a\u90fd\u5728\u7528\u7684\u65b9\u6848\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 sun.misc.Unsafe \u800c\u4e0d\u662f MemorySegment\uff0c\u6765\u907f\u514d\u8fb9\u754c\u68c0\u67e5<\/li>\n<li>\u907f\u514d\u91cd\u65b0\u8bfb\u53d6\u76f8\u540c\u7684\u8f93\u5165\u5b57\u8282\uff1a\u91cd\u590d\u4f7f\u7528\u52a0\u8f7d\u7684\u503c\u8fdb\u884c\u54c8\u5e0c\u548c\u5206\u53f7\u641c\u7d22<\/li>\n<li>\u6bcf\u6b21\u5904\u7406 8 \u4e2a\u5b57\u8282\u7684\u6570\u636e\uff0c\u4f7f\u7528 SWAR \u6280\u672f\u627e\u5230\u5206\u53f7\u5206\u9694\u7b26\u3002<\/li>\n<li>\u4f7f\u7528 merykitty \u8001\u54e5\u63d0\u4f9b\u7684\u725b\u903c\u7684 SWAR\uff08SIMD Within A Register\uff09\u4ee3\u7801\u89e3\u6790\u6e29\u5ea6\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u662f\u8fd9\u4e00\u7248\u7684\u4ee3\u7801\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=g2jIpaM4dBvCPkJMQ7JI0A%3D%3D.CUmySsCujsIGHrmiNG3AxZcoolJAWJL6OZHpsajcDoJlSWJeL%2FEcF57LBuoBzbLfhzJj%2FvzUrjYqIy%2FKltcoouUg5WUccytLrs7AoFVz%2F%2BQ%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/mtopolnik\/billion-row-challenge\/blob\/main\/src\/Blog4.java<\/a><\/p><\/blockquote>\n<p>\u6bd4\u5982\u5176\u4e2d\u5173\u4e8e\u5faa\u73af\u5904\u7406\u6570\u636e\u7684\u90e8\u5206\uff0c\u770b\u8d77\u6765\u5c31\u5f88\u4e4b\u524d\u5f88\u4e0d\u4e00\u6837\u4e86\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679499\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u7136\u540e\u4f60\u518d\u770b\u91cc\u9762 semicolonMatchBits\u3001nameLen\u3001maskWord\u3001dotPos\u3001parseTemperature \u8fd9\u4e9b\u65b9\u6cd5\u7684\u8c03\u7528\uff0c\u76f4\u63a5\u5c31\u662f\u4e00\u4e2a\u61f5\u903c\u7684\u72b6\u6001\uff0c\u770b\u7740\u5934\u90fd\u5927\u4e86\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679500\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4f46\u662f\u4f60\u4ed4\u7ec6\u770b\uff0c\u4f60\u4f1a\u53d1\u73b0\u8fd9\u51e0\u4e2a\u65b9\u6cd5\u662f\u4f5c\u8005\u4ece\u5176\u4ed6\u4eba\u90a3\u8fb9\u5b66\u6765\u7684\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679501\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6bd4\u5982\u8fd9\u4e2a\u53eb\u505a merykitty \u7684\u8001\u54e5\uff0c\u63d0\u4f9b\u4e86\u89e3\u6790\u6e29\u5ea6\u7684\u4ee3\u7801\uff0c\u867d\u7136\u4f5c\u8005\u52a0\u5165\u4e86\u5927\u91cf\u7684\u6ce8\u91ca\u8bf4\u660e\uff0c\u4f46\u662f\u6211\u4e5f\u53ea\u662f\u5927\u6982\u5c31\u770b\u61c2\u4e86\u4e0d\u5230\u4e09\u5c42\u5427\u3002<\/p>\n<p>\u8fd9\u91cc\u9762\u5927\u91cf\u7684\u4f7f\u7528\u4e86\u4f4d\u8fd0\u7b97\u7684\u6280\u5de7\uff0c\u540c\u65f6\u4f60\u4ed4\u7ec6\u770b\uff1a\u51e0\u4e4e\u6ca1\u6709 if \u5224\u65ad\u7684\u5b58\u5728\u3002\u8fd9\u662f\u91cd\u70b9\uff0c\u7528\u76f4\u63a5\u7684\u4f4d\u8fd0\u7b97\u66ff\u6362\u4e86\u5206\u652f\u6307\u4ee4\uff0c\u4ece\u800c\u51cf\u5c11\u4e86\u5206\u652f\u9884\u6d4b\u9519\u8bef\u7684\u6210\u672c\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8fd8\u6709\u5f88\u591a\u6211\u7b2c\u4e00\u6b21\u89c1\u3001\u53eb\u4e0d\u4e0a\u540d\u5b57\u7684\u5947\u6280\u6deb\u5de7\u3002<\/p>\n<p>\u901a\u8fc7\u8fd9\u4e00\u6ce2\u201c\u6211\u770b\u4e0d\u61c2\uff0c\u4f46\u662f\u6211\u5927\u53d7\u9707\u64bc\u201d\u7684\u64cd\u4f5c\u641e\u4e0b\u6765\uff0c\u65f6\u95f4\u964d\u4f4e\u5230\u4e86 2.4s\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679502\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u7b2c\u4e94\u7248\u4f18\u5316\uff1a\u7edf\u8ba1\u5b66\u7528\u8d77\u6765<\/h3>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u7684\u706b\u7130\u56fe\u53d8\u6210\u4e86\u8fd9\u6837\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=8RUjXuT1azhKckyz5nk0tg%3D%3D.rFw%2B0YklHzsWEfazWTsP6qhAQzg0cE%2Bljgr4ScnBXo6gBDSkGvtx64UyTNK2yAwD\" rel=\"noopener noreferrer\">https:\/\/questdb.io\/html\/blog\/profile-blog4<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679503\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u8017\u65f6\u4e3b\u8981\u8fd8\u662f\u5728\u4e8e findAcc \u65b9\u6cd5\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679504\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u800c findAcc \u65b9\u6cd5\u7684\u8017\u65f6\u5728\u4e8e nameEquals \u65b9\u6cd5\uff0c\u5224\u65ad\u5f53\u524d\u6c14\u8c61\u7ad9\u540d\u79f0\u662f\u5426\u51fa\u73b0\u8fc7\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679505\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679506\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4f46\u662f\u8fd9\u4e2a\u65b9\u6cd5\u91cc\u9762\u6709\u4e2a if \u5224\u65ad\uff0c\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u7684\u5185\u5bb9\uff0c\u6bcf\u6b21\u6bd4\u8f83 8 \u4e2a\u5b57\u8282\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5b83\u901a\u8fc7\u5faa\u73af\u9010\u6b65\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u4e2d\u7684\u5bf9\u5e94\u5b57\u8282\u3002\u5728\u6bcf\u6b21\u8fed\u4ee3\u4e2d\uff0c\u5b83\u4f7f\u7528 getLong \u65b9\u6cd5\u4ece\u8f93\u5165\u5b57\u7b26\u4e32\u4e2d\u83b7\u53d6\u4e00\u4e2a 64 \u4f4d\u7684\u957f\u6574\u578b\u503c\uff0c\u5e76\u4e0e\u53e6\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e2d\u7684\u76f8\u5e94\u4f4d\u7f6e\u8fdb\u884c\u6bd4\u8f83\u3002\u5982\u679c\u53d1\u73b0\u4e0d\u76f8\u7b49\u7684\u5b57\u8282\uff0c\u5219\u8fd4\u56de false\uff0c\u8868\u793a\u4e24\u4e2a\u5b57\u7b26\u4e32\u4e0d\u76f8\u7b49\u3002<\/p>\n<p>\u5982\u679c\u5faa\u73af\u7ed3\u675f\u540e\u6ca1\u6709\u53d1\u73b0\u4e0d\u76f8\u7b49\u7684\u5b57\u8282\uff0c\u5b83\u4f1a\u7ee7\u7eed\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u6bd4\u8f83\u4e86\u8f93\u5165\u5b57\u7b26\u4e32\u7684\u6240\u6709\u5b57\u8282\uff0c\u6216\u8005\u6700\u540e\u4e00\u4e2a\u8f93\u5165\u5b57\u7b26\u4e32\u7684\u5b57\u8282\u4e0e\u76f8\u5e94\u4f4d\u7f6e\u7684\u5b57\u7b26\u4e32\u5b57\u8282\u76f8\u7b49\uff0c\u90a3\u4e48\u8868\u793a\u4e24\u4e2a\u5b57\u7b26\u4e32\u76f8\u7b49\uff0c\u5219\u8fd4\u56de true\u3002<\/p>\n<p>\u90a3\u4e48\u95ee\u9898\u5c31\u6765\u4e86\uff1f<\/p>\n<p>\u5982\u679c\u6c14\u8c61\u7ad9\u540d\u79f0\u957f\u5ea6\u5168\u90fd\u662f\u5c0f\u4e8e 8 \u4e2a\u5b57\u8282\uff0c\u4f1a\u51fa\u73b0\u5565\u60c5\u51b5\uff1f<\/p>\n<p>\u5047\u8bbe\u6709\u8fd9\u6837\u7684\u4e00\u4e2a\u524d\u63d0\u6761\u4ef6\uff0c\u662f\u4e0d\u662f\u6211\u4eec\u5c31\u4e0d\u7528\u5728 for \u5faa\u73af\u4e2d\u8fdb\u884c if \u5224\u65ad\u4e86\uff0c\u76f4\u63a5\u4e00\u628a\u5c31\u6bd4\u8f83\u5b8c\u6210\u4e86\uff1f<\/p>\n<p>\u5f88\u53ef\u60dc\uff0c\u6ca1\u6709\u8fd9\u6837\u4e00\u4e2a\u63d0\u524d\u6761\u4ef6\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u5982\u679c\u5728\u6570\u636e\u96c6\u4e2d\uff0c\u6c14\u8c61\u7ad9\u540d\u79f0\u957f\u5ea6\u7edd\u5927\u90e8\u5206\u90fd\u5c0f\u4e8e 8 \u4e2a\u5b57\u8282\u90a3\u662f\u4e0d\u662f\u5c31\u53ef\u4ee5\u5355\u72ec\u5904\u7406\u4e00\u4e0b\uff1f<\/p>\n<p>\u90a3\u5230\u5e95\u6570\u636e\u5206\u5e03\u662f\u600e\u4e48\u6837\u7684\u5462\uff1f<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u95ee\u9898\u51fa\u53bb\u7684\u4e00\u77ac\u95f4\uff0c\u7edf\u8ba1\u5b66\u556a\u7684\u4e00\u4e0b\u5c31\u7ad9\u51fa\u6765\u4e86\uff1a\u8fd9\u4e2a\u8001\u5b50\u5728\u884c\uff0c\u6211\u7b97\u7b97\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u4f5c\u8005\u5199\u4e86\u4e00\u4e2a\u7a0b\u5e8f\u6765\u7edf\u8ba1\u5206\u6790\u6570\u636e\u96c6\u4e2d\u6c14\u8c61\u7ad9\u540d\u79f0\u7684\u957f\u5ea6\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=f5typbYJKdAg%2FxigbZnBYQ%3D%3D.Rf1spBiaQ60jGDWasvkkoIhOZS8fG0TczFoTIz0SZCrjrUM8n2JbwlUtIG4%2FlARrz17e7DXU6tpoV2w4uxFgejL%2Ba9f2RHfphBWYc%2BUnq0ztcQcfoIdU56mGa8tG0tRy\" rel=\"noopener noreferrer\">https:\/\/github.com\/mtopolnik\/billion-row-challenge\/blob\/main\/src\/Statistics.java<\/a><\/p><\/blockquote>\n<p>\u57fa\u4e8e\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c\uff0c\u6700\u7ec8\u7684\u7ed3\u8bba\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679507\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679508\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u901a\u8fc7\u5206\u6790\u4f5c\u8005\u53d1\u73b0\uff0c\u8d5b\u9898\u7684\u6570\u636e\u96c6\u4e2d\u6c14\u8c61\u7ad9\u540d\u79f0\u957f\u5ea6\u51e0\u4e4e\u5747\u5300\u5206\u5e03\u5728 8 \u5b57\u8282\u4ee5\u4e0a\u548c 8 \u5b57\u8282\u4ee5\u4e0b\u3002<\/p>\n<p>\u8fd0\u884c Statistics.branchPrediction \u65b9\u6cd5\uff0c\u5f53\u6761\u4ef6\u662f nameLen &gt; 8 \u65f6\u5bfc\u81f4\u4e86 50% \u7684\u5206\u652f\u9884\u6d4b\u5931\u8d25\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4\uff0c\u5341\u4ebf\u6570\u636e\u4e2d\u6709\u4e00\u534a\u7684\u6570\u636e\uff0c\u90fd\u662f\u5c0f\u4e8e 8 \u5b57\u8282\u7684\uff0c\u90fd\u662f\u4e0d\u7528\u7279\u610f\u8fdb\u884c if \u5224\u65ad\u7684\u3002<\/p>\n<p>\u4f46\u5982\u679c\u5c06\u6761\u4ef6\u66f4\u6539\u4e3a nameLen &gt; 16\uff0c\u90a3\u4e48\u9884\u6d4b\u5931\u8d25\u7387\u5c06\u964d\u81f3 2.5%\u3002<\/p>\n<p>\u6839\u636e\u8fd9\u4e00\u53d1\u73b0\uff0c\u5f88\u660e\u663e\uff0c\u5982\u679c\u8981\u8fdb\u4e00\u6b65\u4f18\u5316\u4ee3\u7801\uff0c\u5c31\u9700\u8981\u7f16\u5199\u4e00\u4e9b\u7279\u5b9a\u7684\u4ee3\u7801\u6765\u907f\u514d\u5728 nameLen &gt; 8 \u4e0a\u4f7f\u7528\u4efb\u4f55 if \u5224\u65ad\uff0c\u76f4\u63a5\u4f7f\u7528 nameLen &gt; 16 \u5c31\u884c\u3002<\/p>\n<p>\u8fd9\u662f\u8fd9\u4e00\u7248\u7684\u6700\u7ec8\u4ee3\u7801\uff0c\u53ef\u8bfb\u6027\u8d8a\u6765\u8d8a\u5dee\u4e86\uff1a<\/p>\n<blockquote><p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=ijJeMQR0%2FUmeBLiM%2BoK5qg%3D%3D.SeA%2BLhj6U7bL5WDpMvbW4aso7D4X2zCY8sEK5dmU4Ci%2BCF6bXtNSEwJq%2BgGoIw3ZXZEEOB8fssq2wn06oLifvcyEoy1AwOsWhlr8iIGwjX4%3D\" rel=\"noopener noreferrer\">https:\/\/github.com\/mtopolnik\/billion-row-challenge\/blob\/main\/src\/Blog5.java<\/a><\/p><\/blockquote>\n<p>\u4f46\u662f\u6700\u7ec8\u7684\u6210\u7ee9\u662f 1.8s\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679509\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u54e6\uff0c\u5bf9\u4e86\uff0c\u5982\u679c\u4f60\u5bf9\u4e8e\u5206\u652f\u9884\u6d4b\u6280\u672f\u4e0d\u592a\u6e05\u695a\uff0c\u90a3\u4f60\u53ef\u80fd\u770b\u5f97\u6bd4\u8f83\u61f5\u3002<\/p>\n<p>\u4f46\u662f\u5206\u652f\u9884\u6d4b\uff0c\u5728\u6027\u80fd\u6311\u6218\u4e2d\uff0c\u7279\u522b\u662f\u6700\u540e\u5927\u5bb6\u6bd4\u5206\u90fd\u54ac\u7684\u975e\u5e38\u7d27\u7684\u60c5\u51b5\u4e0b\uff0c\u6bcf\u6b21\u90fd\u662f\u5c61\u7acb\u5947\u529f\uff0c\u6218\u529f\u8d6b\u8d6b\uff0c\u5c5e\u4e8e\u9ad8\u624b\u95f4\u8fc7\u62db\u6740\u624b\u950f\u7ea7\u522b\u7684\u4f18\u5316\u624b\u6bb5\u3002<\/p>\n<h3>\u7ee7\u7eed\u4f18\u5316<\/h3>\n<p>\u518d\u540e\u9762\u4f5c\u8005\u8fd8\u6709\u8fd9\u4e24\u4e2a\u90e8\u5206\u3002<\/p>\n<p>\u6d88\u9664\u542f\u52a8\/\u6e05\u7406\u6210\u672c\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679510\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4f7f\u7528\u66f4\u5c0f\u7684\u6587\u4ef6\u5206\u5757\u548c\u5de5\u4f5c\u7a83\u53d6\u673a\u5236\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679511\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u8fd9\u540e\u9762\u5c31\u5b8c\u5168\u662f\u57fa\u4e8e\u8fd9\u4e2a\u8d5b\u9898\u8fdb\u884c\u5b9a\u5236\u5316\u7684\u4f18\u5316\uff0c\u53ef\u79fb\u690d\u6027\u4e0d\u5f3a\u4e86\uff0c\u4f5c\u8005\u5c31\u6ca1\u6709\u8fdb\u884c\u8be6\u7ec6\u63cf\u8ff0\uff0c\u518d\u52a0\u4e0a\u4e00\u4e2a\u6211\u4e5f\u662f\u6ca1\u600e\u4e48\u770b\u660e\u767d\uff0c\u5c31\u4e0d\u5c55\u5f00\u8bb2\u4e86\u3002<\/p>\n<p>\u53cd\u6b63\u8fd9\u4e24\u4e2a\u7ec4\u5408\u62f3\u4e0b\u6765\uff0c\u53c8\u641e\u4e86 0.1s \u7684\u65f6\u95f4\u4e0b\u6765\uff0c\u6700\u7ec8\u7684\u6210\u7ee9\u4e3a 1.7s\uff1a<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679512\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6211\u5b9e\u5728\u662f\u5b66\u4e0d\u52a8\u4e86\uff0c\u6709\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u81ea\u5df1\u53bb\u770b\u770b\u539f\u6587\u7684\u5bf9\u5e94\u90e8\u5206\u3002<\/p>\n<p><img decoding=\"async\"   referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000044679513\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>\u5199\u5728\u540e\u9762<\/h2>\n<p>\u5176\u5b9e\u5173\u4e8e\u8fd9\u7bc7\u6587\u7ae0\uff0c\u6211\u539f\u60f3\u6cd5\u662f\u770b\u61c2\u524d\u4e09\u540d\u7684\u4ee3\u7801\uff0c\u7136\u540e\u5bf9\u4ee3\u7801\u8fdb\u884c\u89e3\u6790\u3001\u5bf9\u6bd4\uff0c\u627e\u5230\u4ed6\u4eec\u601d\u8def\u7684\u5171\u540c\u70b9\u548c\u5dee\u5f02\u70b9\uff0c\u4f46\u662f\u540e\u6765\u4ed6\u4eec\u7684\u4ee3\u7801\u786e\u5b9e\u6211\u770b\u4e0d\u61c2\uff0c\u6240\u4ee5\u6211\u653e\u5f03\u4e86\u8fd9\u4e2a\u60f3\u6cd5\u3002<\/p>\n<p>\u4f46\u662f\u6211\u77e5\u9053\uff0c\u53ea\u8981\u6211\u613f\u610f\u82b1\u65f6\u95f4\u3001\u6709\u8db3\u591f\u7684\u65f6\u95f4\uff0c\u6211\u80af\u5b9a\u53ef\u4ee5\u6162\u6162\u5730\u628a\u4ed6\u4eec\u7684\u8fd9\u51e0\u767e\u884c\u4ee3\u7801\u5543\u900f\uff0c\u4f46\u662f\u6211\u4e5f\u53ea\u662f\u60f3\u4e86\u60f3\u800c\u5df2\uff0c\u5f88\u5feb\u5c31\u653e\u5f03\u4e86\u8fd9\u4e2a\u601d\u8def\u3002<\/p>\n<p>\u6211\u60f3\u5982\u679c\u662f\u5927\u5b66\u7684\u65f6\u5019\uff0c\u6211\u770b\u5230\u8fd9\u4e2a\u6bd4\u8d5b\uff0c\u6211\u4f1a\u89c9\u5f97\uff0c\u771f\u725b\u903c\uff0c\u6211\u5f97\u597d\u597d\u7814\u7a76\u4e00\u4e0b\u3002<\/p>\n<p>\u7136\u800c\u73b0\u5728\u4e0d\u4e00\u6837\u4e86\uff0c\u53c2\u52a0\u5de5\u4f5c\u4e86\uff0c\u770b\u5230\u4e86\u8fd9\u4e2a\u6bd4\u8d5b\uff0c\u6211\u8fd8\u662f\u4f1a\u89c9\u5f97\uff0c\u771f\u725b\u903c\uff0c\u4f46\u662f\u5bf9\u6211\u5199\u4e1a\u52a1\u4ee3\u7801\u5e2e\u52a9\u4e0d\u5927\uff0c\u5c31\u4e0d\u6df1\u7a76\u4e86\uff0c\u6d45\u5c1d\u8f84\u6b62\u3002<\/p>\n<p>\u5927\u5b66\u7684\u65f6\u5019\u5b66\u4e60\u662f\u9760\u81ea\u5df1\u65e0\u7a77\u7684\u7cbe\u529b\u548c\u5bf9\u4e8e\u638c\u63e1\u65b0\u77e5\u8bc6\u7684\u4e50\u8da3\u6491\u7740\uff0c\u73b0\u5728\u5b66\u4e60\u4e3b\u8981\u9760\u4e00\u65f6\u51b2\u52a8\u3002<\/p>\n<p>\u4f46\u662f\u6211\u8fd8\u662f\u5f3a\u70c8\u5efa\u8bae\u611f\u5174\u8da3\u7684\u670b\u53cb\uff0c\u6309\u7167\u6211\u95ee\u4e2d\u63d0\u5230\u7684\u5730\u5740\uff0c\u81ea\u5df1\u53bb\u7814\u7a76\u4e00\u6ce2\u522b\u4eba\u63d0\u4ea4\u7684\u4ee3\u7801\u3002<\/p>\n<p>\u4e5f\u8bb8\u4f60\u4e5f\u4f1a\u4ea7\u751f\u4e00\u6837\u7684\u7591\u95ee\uff1a\u4ed6\u4eec\u5199\u7684 Java \u548c\u6211\u4f1a\u7684 Java \u662f\u540c\u4e00\u4e2a Java \u5417\uff1f<\/p>\n<p>\u6211\u7684\u7b54\u6848\u662f\uff1a\u4e0d\u662f\u7684\uff0c\u4ed6\u4eec\u5199\u7684 Java \u662f\u81ea\u5df1\u70ed\u7231\u7684 Java\uff0c\u6211\u4eec\u5199\u7684 Java \u53ea\u662f\u6323\u94b1\u7684 Java\u3002<\/p>\n<p>\u6ca1\u6709\u9ad8\u4f4e\u8d35\u8d31\u4e4b\u5206\uff0c\u4f46\u662f\u80fd\u8ba9\u4f60\u4e0d\u7ecf\u610f\u95f4\uff0c\u4ece\u4e1a\u52a1\u4ee3\u7801\u7684\u6df1\u6d77\u4e2d\u62ac\u5934\u770b\u4e00\u773c\uff0c\u770b\u5230\u81ea\u5df1\u719f\u6089\u7684\u9886\u57df\u4e2d\uff0c\u66f4\u5e7f\u9614\u7684\u4e16\u754c\u3002<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000044679461\">https:\/\/segmentfault.com\/a\/1190000044679461<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u597d\u5440\uff0c\u6211\u662f\u6b6a\u6b6a\u3002 \u6625\u8282\u671f\u95f4\u5173\u6ce8\u5230\u4e86\u4e00\u4e2a\u5173\u4e8e Java \u65b9\u9762\u7684\u6bd4\u8d5b\uff0c\u5f88\u6709\u610f\u601d\u3002\u7531\u4e8e\u662f\u5f00\u6e90\u7684\uff0c\u6211\u628a\u9879\u76ee\u62c9\u4e0b\u6765\u8bd5\u56fe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10008419","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10008419"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008419\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10008419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10008419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10008419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}