You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
18 KiB
JavaScript

"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[2009],{2852:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>x,contentTitle:()=>d,default:()=>g,frontMatter:()=>l,metadata:()=>h,toc:()=>c});var r=n(5893),s=n(1151),i=n(4996);const l={id:"benchmark",title:"36.3 \u57fa\u51c6\u6d4b\u8bd5",sidebar_label:"36.3 \u57fa\u51c6\u6d4b\u8bd5"},d=void 0,h={id:"benchmark",title:"36.3 \u57fa\u51c6\u6d4b\u8bd5",description:"36.3.1 \u57fa\u51c6\u6d4b\u8bd5",source:"@site/docs/benchmark.mdx",sourceDirName:".",slug:"/benchmark",permalink:"/docs/benchmark",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/benchmark.mdx",tags:[],version:"current",lastUpdatedBy:"MonkSoul",lastUpdatedAt:1677826828,formattedLastUpdatedAt:"Mar 3, 2023",frontMatter:{id:"benchmark",title:"36.3 \u57fa\u51c6\u6d4b\u8bd5",sidebar_label:"36.3 \u57fa\u51c6\u6d4b\u8bd5"},sidebar:"docs",previous:{title:"36.2 \u8d1f\u8f7d\u538b\u6d4b",permalink:"/docs/performance"},next:{title:"36.4 \u5e76\u53d1\u6d4b\u8bd5",permalink:"/docs/bingfa"}},x={},c=[{value:"36.3.1 \u57fa\u51c6\u6d4b\u8bd5",id:"3631-\u57fa\u51c6\u6d4b\u8bd5",level:2},{value:"36.3.2 \u57fa\u51c6\u6d4b\u8bd5\u7279\u8d28\u53ca\u610f\u4e49",id:"3632-\u57fa\u51c6\u6d4b\u8bd5\u7279\u8d28\u53ca\u610f\u4e49",level:2},{value:"36.3.2.1 \u7279\u8d28",id:"36321-\u7279\u8d28",level:3},{value:"36.3.2.2 \u610f\u4e49",id:"36322-\u610f\u4e49",level:3},{value:"36.3.3 <code>BenchmarkDotNet</code>",id:"3633-benchmarkdotnet",level:2},{value:"36.3.3.1 \u5982\u4f55\u4f7f\u7528",id:"36331-\u5982\u4f55\u4f7f\u7528",level:3},{value:"36.3.3.2 \u67e5\u770b\u7ed3\u679c",id:"36332-\u67e5\u770b\u7ed3\u679c",level:3},{value:"36.3.3.3 \u5bfc\u51fa\u62a5\u8868",id:"36333-\u5bfc\u51fa\u62a5\u8868",level:3},{value:"36.3.4 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"3634-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function j(t){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.a)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h2,{id:"3631-\u57fa\u51c6\u6d4b\u8bd5",children:"36.3.1 \u57fa\u51c6\u6d4b\u8bd5"}),"\n",(0,r.jsx)(e.p,{children:"\u57fa\u51c6\u6d4b\u8bd5\uff08benchmarking\uff09\u662f\u4e00\u79cd\u6d4b\u91cf\u548c\u8bc4\u4f30\u8f6f\u4ef6\u6027\u80fd\u6307\u6807\u7684\u6d3b\u52a8\u3002\u4f60\u53ef\u4ee5\u5728\u67d0\u4e2a\u65f6\u5019\u901a\u8fc7\u57fa\u51c6\u6d4b\u8bd5\u5efa\u7acb\u4e00\u4e2a\u5df2\u77e5\u7684\u6027\u80fd\u6c34\u5e73\uff08\u79f0\u4e3a\u57fa\u51c6\u7ebf\uff09\uff0c\u5f53\u7cfb\u7edf\u7684\u8f6f\u786c\u4ef6\u73af\u5883\u53d1\u751f\u53d8\u5316\u4e4b\u540e\u518d\u8fdb\u884c\u4e00\u6b21\u57fa\u51c6\u6d4b\u8bd5\u4ee5\u786e\u5b9a\u90a3\u4e9b\u53d8\u5316\u5bf9\u6027\u80fd\u7684\u5f71\u54cd\u3002\u8fd9\u662f\u57fa\u51c6\u6d4b\u8bd5\u6700\u5e38\u89c1\u7684\u7528\u9014\u3002\u5176\u4ed6\u7528\u9014\u5305\u62ec\u6d4b\u5b9a\u67d0\u79cd\u8d1f\u8f7d\u6c34\u5e73\u4e0b\u7684\u6027\u80fd\u6781\u9650\u3001\u7ba1\u7406\u7cfb\u7edf\u6216\u73af\u5883\u7684\u53d8\u5316\u3001\u53d1\u73b0\u53ef\u80fd\u5bfc\u81f4\u6027\u80fd\u95ee\u9898\u7684\u6761\u4ef6\uff0c\u7b49\u7b49\u3002"}),"\n",(0,r.jsx)(e.h2,{id:"3632-\u57fa\u51c6\u6d4b\u8bd5\u7279\u8d28\u53ca\u610f\u4e49",children:"36.3.2 \u57fa\u51c6\u6d4b\u8bd5\u7279\u8d28\u53ca\u610f\u4e49"}),"\n",(0,r.jsx)(e.h3,{id:"36321-\u7279\u8d28",children:"36.3.2.1 \u7279\u8d28"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"\u53ef\u91cd\u590d\u6027"}),"\uff1a\u53ef\u8fdb\u884c\u91cd\u590d\u6027\u7684\u6d4b\u8bd5\uff0c\u8fd9\u6837\u505a\u6709\u5229\u4e8e\u6bd4\u8f83\u6bcf\u6b21\u7684\u6d4b\u8bd5\u7ed3\u679c\uff0c\u5f97\u5230\u6027\u80fd\u7ed3\u679c\u7684\u957f\u671f\u53d8\u5316\u8d8b\u52bf\uff0c\u4e3a\u7cfb\u7edf\u8c03\u4f18\u548c\u4e0a\u7ebf\u524d\u7684\u5bb9\u91cf\u89c4\u5212\u505a\u53c2\u8003\u3002"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"\u53ef\u89c2\u6d4b\u6027"}),"\uff1a\u901a\u8fc7\u5168\u65b9\u4f4d\u7684\u76d1\u63a7\uff08\u5305\u62ec\u6d4b\u8bd5\u5f00\u59cb\u5230\u7ed3\u675f\uff0c\u6267\u884c\u673a\u3001\u670d\u52a1\u5668\u3001\u6570\u636e\u5e93\uff09\uff0c\u53ca\u65f6\u4e86\u89e3\u548c\u5206\u6790\u6d4b\u8bd5\u8fc7\u7a0b\u53d1\u751f\u4e86\u4ec0\u4e48\u3002"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"\u53ef\u5c55\u793a\u6027"}),"\uff1a\u76f8\u5173\u4eba\u5458\u53ef\u4ee5\u76f4\u89c2\u660e\u4e86\u7684\u4e86\u89e3\u6d4b\u8bd5\u7ed3\u679c\uff08web \u754c\u9762\u3001\u4eea\u8868\u76d8\u3001\u6298\u7ebf\u56fe\u6811\u72b6\u56fe\u7b49\u5f62\u5f0f\uff09\u3002"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"\u771f\u5b9e\u6027"}),"\uff1a\u6d4b\u8bd5\u7684\u7ed3\u679c\u53cd\u6620\u4e86\u5ba2\u6237\u4f53\u9a8c\u5230\u7684\u771f\u5b9e\u7684\u60c5\u51b5\uff08\u771f\u5b9e\u51c6\u786e\u7684\u4e1a\u52a1\u573a\u666f+\u4e0e\u751f\u4ea7\u4e00\u81f4\u7684\u914d\u7f6e+\u5408\u7406\u6b63\u786e\u7684\u6d4b\u8bd5\u65b9\u6cd5\uff09\u3002"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"\u53ef\u6267\u884c\u6027"}),"\uff1a\u76f8\u5173\u4eba\u5458\u53ef\u4ee5\u5feb\u901f\u7684\u8fdb\u884c\u6d4b\u8bd5\u9a8c\u8bc1\u4fee\u6539\u8c03\u4f18\uff08\u53ef\u5b9a\u4f4d\u53ef\u5206\u6790\uff09\u3002"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"36322-\u610f\u4e49",children:"36.3.2.2 \u610f\u4e49"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"\u4e3a\u5bb9\u91cf\u89c4\u5212\u786e\u5b9a\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u6781\u9650\uff1b"}),"\n",(0,r.jsx)(e.li,{children:"\u4e3a\u914d\u7f6e\u6d4b\u8bd5\u7684\u53c2\u6570\u548c\u914d\u7f6e\u9009\u9879\u63d0\u4f9b\u53c2\u8003\u4f9d\u636e\uff1b"}),"\n",(0,r.jsx)(e.li,{children:"\u4e3a\u9a8c\u6536\u6d4b\u8bd5\u786e\u5b9a\u7cfb\u7edf\u662f\u5426\u5177\u5907\u81ea\u5df1\u6240\u5ba3\u79f0\u7684\u80fd\u529b\uff1b"}),"\n",(0,r.jsx)(e.li,{children:"\u4e3a\u6027\u80fd\u57fa\u7ebf\u7684\u5efa\u7acb\u63d0\u4f9b\u957f\u671f\u7684\u6570\u636e\u7edf\u8ba1\u6765\u6e90\u4ee5\u53ca\u6bd4\u8f83\u57fa\u51c6\uff1b"}),"\n"]}),"\n",(0,r.jsxs)(e.h2,{id:"3633-benchmarkdotnet",children:["36.3.3 ",(0,r.jsx)(e.code,{children:"BenchmarkDotNet"})]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"BenchmarkDotNet"})," \u662f ",(0,r.jsx)(e.code,{children:".NET"})," \u5e73\u53f0\u63d0\u4f9b\u7684\u57fa\u51c6\u6d4b\u8bd5\u5de5\u5177\uff0c",(0,r.jsx)(e.code,{children:"BenchmarkDotNet"})," \u53ef\u5e2e\u52a9\u60a8\u5c06\u65b9\u6cd5\u8f6c\u6362\u4e3a\u57fa\u51c6\uff0c\u8ddf\u8e2a\u5176\u6027\u80fd\uff0c\u5e76\u5171\u4eab\u53ef\u91cd\u590d\u7684\u6d4b\u91cf\u5b9e\u9a8c\u3002",(0,r.jsx)(e.code,{children:"BenchmarkDotNet"})," \u53ef\u4fdd\u62a4\u60a8\u514d\u53d7\u6d41\u884c\u7684\u57fa\u51c6\u6d4b\u8bd5\u9519\u8bef\uff0c\u5e76\u5728\u57fa\u51c6\u8bbe\u8ba1\u6216\u83b7\u5f97\u7684\u6d4b\u91cf\u4e2d\u51fa\u73b0\u95ee\u9898\u65f6\u8b66\u544a\u60a8\u3002\u7ed3\u679c\u4ee5\u7528\u6237\u53cb\u597d\u7684\u5f62\u5f0f\u5448\u73b0\uff0c\u7a81\u51fa\u663e\u793a\u4e86\u6709\u5173\u5b9e\u9a8c\u7684\u6240\u6709\u91cd\u8981\u4e8b\u5b9e\u3002"]}),"\n",(0,r.jsx)(e.h3,{id:"36331-\u5982\u4f55\u4f7f\u7528",children:"36.3.3.1 \u5982\u4f55\u4f7f\u7528"}),"\n",(0,r.jsxs)(e.p,{children:["\u521b\u5efa\u4e00\u4e2a ",(0,r.jsx)(e.code,{children:"\u63a7\u5236\u53f0"})," \u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u901a\u8fc7 ",(0,r.jsx)(e.code,{children:"NuGet"})," \u5b89\u88c5 ",(0,r.jsx)(e.a,{href:"https://www.nuget.org/packages/BenchmarkDotNet/",children:"BenchmarkDotNet"})," \u62d3\u5c55\u5305\u3002\u7f16\u5199\u6d4b\u8bd5\uff1a"]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-cs",metastring:"showLineNumbers {3-4,22,25,33}",children:"using System;\r\nusing System.Security.Cryptography;\r\nusing BenchmarkDotNet.Attributes;\r\nusing BenchmarkDotNet.Running;\r\n\r\nnamespace MyBenchmarks\r\n{\r\n public class Md5VsSha256\r\n {\r\n private const int N = 10000;\r\n private readonly byte[] data;\r\n\r\n private readonly SHA256 sha256 = SHA256.Create();\r\n private readonly MD5 md5 = MD5.Create();\r\n\r\n public Md5VsSha256()\r\n {\r\n data = new byte[N];\r\n new Random(42).NextBytes(data);\r\n }\r\n\r\n [Benchmark]\r\n public byte[] Sha256() => sha256.ComputeHash(data);\r\n\r\n [Benchmark]\r\n public byte[] Md5() => md5.ComputeHash(data);\r\n }\r\n\r\n public class Program\r\n {\r\n public static void Main(string[] args)\r\n {\r\n var summary = BenchmarkRunner.Run<Md5VsSha256>();\r\n }\r\n }\r\n}\n"})}),"\n",(0,r.jsx)(e.h3,{id:"36332-\u67e5\u770b\u7ed3\u679c",children:"36.3.3.2 \u67e5\u770b\u7ed3\u679c"}),"\n",(0,r.jsx)(e.p,{children:"\u8fd0\u884c\u63a7\u5236\u5668\u7a0b\u5e8f\uff0c\u5c06\u5f97\u5230\u4ee5\u4e0b\u7ed3\u679c"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{children:"BenchmarkDotNet=v0.12.0, OS=Windows 10.0.17763.805 (1809/October2018Update/Redstone5)\r\nIntel Core i7-7700K CPU 4.20GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores\r\n [Host] : .NET Framework 4.7.2 (4.7.3468.0), X64 RyuJIT\r\n Net472 : .NET Framework 4.7.2 (4.7.3468.0), X64 RyuJIT\r\n NetCoreApp30 : .NET Core 3.0.0 (CoreCLR 4.700.19.46205, CoreFX 4.700.19.46214), X64 RyuJIT\r\n CoreRt30 : .NET CoreRT 1.0.28236.02 @Commit: 741d61493c560ba96e8151f9e56876d4d3828489, X64 AOT\r\n Mono : Mono 6.4.0 (Visual Studio), X64\n"})}),"\n",(0,r.jsxs)(e.table,{children:[(0,r.jsx)(e.thead,{children:(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.th,{children:"Method"}),(0,r.jsx)(e.th,{children:"Runtime"}),(0,r.jsx)(e.th,{children:"N"}),(0,r.jsx)(e.th,{style:{textAlign:"right"},children:"Mean"}),(0,r.jsx)(e.th,{style:{textAlign:"right"},children:"Error"}),(0,r.jsx)(e.th,{style:{textAlign:"right"},children:"StdDev"}),(0,r.jsx)(e.th,{style:{textAlign:"right"},children:"Ratio"})]})}),(0,r.jsxs)(e.tbody,{children:[(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:".NET 4.7.2"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"7.735 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.1913 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.4034 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.00"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:".NET Core 3.0"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"3.989 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0796 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0745 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.50"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:"CoreRt 3.0"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"4.091 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0811 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.1562 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.53"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:"Mono"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"13.117 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.2485 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.5019 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.70"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:".NET 4.7.2"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"2.872 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0552 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0737 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.00"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:".NET Core 3.0"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.848 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0348 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0326 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.64"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:"CoreRt 3.0"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.817 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0359 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0427 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.63"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:"Mono"}),(0,r.jsx)(e.td,{children:"1000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"3.574 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0678 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.0753 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.24"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:".NET 4.7.2"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"74.509 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.5787 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"4.6052 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.00"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:".NET Core 3.0"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"36.049 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.7151 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.0025 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.49"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:"CoreRt 3.0"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"36.253 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.7076 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.7571 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.49"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Sha256"}),(0,r.jsx)(e.td,{children:"Mono"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"116.350 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"2.2555 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"3.0110 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.58"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}}),(0,r.jsx)(e.td,{style:{textAlign:"right"}})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:".NET 4.7.2"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"17.308 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.3361 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.4250 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.00"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:".NET Core 3.0"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"15.726 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.2064 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.1930 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.90"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:"CoreRt 3.0"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"15.627 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.2631 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.2461 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.89"})]}),(0,r.jsxs)(e.tr,{children:[(0,r.jsx)(e.td,{children:"Md5"}),(0,r.jsx)(e.td,{children:"Mono"}),(0,r.jsx)(e.td,{children:"10000"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"30.205 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.5868 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"0.6522 us"}),(0,r.jsx)(e.td,{style:{textAlign:"right"},children:"1.74"})]})]})]}),"\n",(0,r.jsx)(e.h3,{id:"36333-\u5bfc\u51fa\u62a5\u8868",children:"36.3.3.3 \u5bfc\u51fa\u62a5\u8868"}),"\n",(0,r.jsx)(e.p,{children:"\u4e5f\u53ef\u4ee5\u5bfc\u51fa\u5404\u79cd\u56fe\u8868"}),"\n",(0,r.jsx)("img",{src:(0,i.Z)("img/bm1.png")}),"\n",(0,r.jsx)(e.h2,{id:"3634-\u53cd\u9988\u4e0e\u5efa\u8bae",children:"36.3.4 \u53cd\u9988\u4e0e\u5efa\u8bae"}),"\n",(0,r.jsx)(e.admonition,{title:"\u4e0e\u6211\u4eec\u4ea4\u6d41",type:"note",children:(0,r.jsxs)(e.p,{children:["\u7ed9 Furion \u63d0 ",(0,r.jsx)(e.a,{href:"https://gitee.com/dotnetchina/Furion/issues/new?issue",children:"Issue"}),"\u3002"]})}),"\n",(0,r.jsx)(e.hr,{}),"\n",(0,r.jsx)(e.admonition,{title:"\u4e86\u89e3\u66f4\u591a",type:"note",children:(0,r.jsxs)(e.p,{children:["\u60f3\u4e86\u89e3\u66f4\u591a ",(0,r.jsx)(e.code,{children:"BenchmarkDotNet"})," \u77e5\u8bc6\u53ef\u67e5\u9605 ",(0,r.jsx)(e.a,{href:"https://benchmarkdotnet.org/",children:"BenchmarkDotNet \u5b98\u7f51"}),"\u3002"]})})]})}function g(t={}){const{wrapper:e}={...(0,s.a)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(j,{...t})}):j(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>d,a:()=>l});var r=n(7294);const s={},i=r.createContext(s);function l(t){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function d(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:l(t.components),r.createElement(i.Provider,{value:e},t.children)}}}]);