{"id":340536,"date":"2022-10-31T15:01:09","date_gmt":"2022-10-31T15:01:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=340536"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=340536","title":{"rendered":"<span>\u041a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/695808\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ir\/5g\/6e\/ir5g6eft0nx8f2zolurucr2ns3o.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ir\/5g\/6e\/ir5g6eft0nx8f2zolurucr2ns3o.png\"\/><\/div>\n<p><\/a><br \/>  \u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e HTTP \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 \u00abcontent-encoding\u00bb, \u00abmime-type\u00bb \u0438 \u00abcontent-lenght\u00bb. \u0418 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u2014 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0445\u043e\u0441\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0430\u0440\u044c\u0435\u0440\u044b. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0434\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Kestrel, .NET 7 RC 1, minimal API \u0438 F#. \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0435\u0441\u0442\u044c \u0438 \u0434\u043b\u044f C#.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0421\u0442\u0430\u0440\u0442<\/font><\/h2>\n<p>  <\/p>\n<pre><code class=\"cs\">let p =     (Directory.GetCurrentDirectory(), \"wwwroot\")     |> Path.Combine  WebApplicationOptions(WebRootPath = p) |> WebApplication.CreateBuilder |> function     | prod when prod.Environment.IsProduction() ->         prod.WebHost.UseKestrel(fun i ->             i.ListenAnyIP(5001)             i.AddServerHeader &lt;- false)         |> ignore          prod.Logging.ClearProviders() |> ignore         prod      | dev ->         dev.Logging.AddConsole().AddDebug() |> ignore         dev  |> fun b -> b.Build() |> fun w ->     w.UseFileServer() |> ignore     w.Run() <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0434\u043e\u0442\u043d\u0435\u0442\u0435 \u2014 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 kestrel \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u043e\u0434 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u043d\u044f\u0442\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BenchmarkDotnet \u0441 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u0441\u0435 \u0431\u0435\u043d\u0447\u0438 \u0434\u0435\u043b\u0430\u043b\u0438\u0441\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. \u0417\u0430\u043e\u0434\u043d\u043e \u044f \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0440\u0443\u0431\u0438\u043b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u043b \u0437\u0430\u043c\u0435\u0440\u0430\u043c.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u0445 \u0431\u044b\u043b\u0438 Autocanon, K6 \u0438 Bombardier. Bombardier \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c.<\/p>\n<pre><code class=\"plaintext\">|          | K6   | Autocannon | Bombardier | |----------|------|:-----------|------------| | Avg. RPS | 4704 | 4596       | 6415.2     |<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 0 \u0431\u0430\u0439\u0442, 3,5\u041a\u0411, 22\u041a\u0411, 31\u041a\u0411, 130 \u0438 417\u041a\u0411 \u0432 1, 8 \u0438 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<p>  \u0422\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438. \u041f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u044f \u043b\u0438\u0448\u044c \u0432\u044b\u0434\u0435\u043b\u044e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438.<\/p>\n<p>  \u0412\u043e\u0442 <a href=\"https:\/\/github.com\/nneeoo\/Try-Speedup-I\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>, \u043a\u043e\u0434 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/-9\/qk\/rh\/-9qkrhn9glij3jxgjx5shsuf6vg.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/-9\/qk\/rh\/-9qkrhn9glij3jxgjx5shsuf6vg.jpeg\" data-blurred=\"true\"\/><\/p>\n<pre><code class=\"cs\">type File =     { Bytes: byte array       ContentEncoding: StringValues       Mime: string }  let p =     (Directory.GetCurrentDirectory(), \"wwwroot\")     |> Path.Combine  let extractMime x = \"image\/webp\" let extractFileName (x: string) = x.LastIndexOf \"\\\\\" + 1 |> x.Substring let dict = Dictionary()  p |> Directory.GetFiles |> Seq.iter (fun i ->     (extractFileName i,      { Bytes = File.ReadAllBytes i        ContentEncoding = StringValues \"none\"        Mime = extractMime i })     |> dict.Add)<\/code><\/pre>\n<p>  Dictionary \u2014 \u0441\u0430\u043c\u0430\u044f \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0432 \u0434\u043e\u0442\u043d\u0435\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0451 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432. \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0431\u0430\u0439\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0440\u0430\u0434\u0438, Content-Type \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u2014 \u00abimage\/webp\u00bb, \u0430 Content-Encoding \u2014 \u201cnone\u201d.<\/p>\n<p>  \u0417\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 \u0440\u0435\u043a\u043e\u0440\u0434 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 Dictionary.<\/p>\n<pre><code class=\"cs\">type FileResult(mime, encoding, stream: byte array) =     interface IResult with         member this.ExecuteAsync(ctx: HttpContext) =             ctx.Response.ContentType &lt;- mime             ctx.Response.Headers.ContentEncoding &lt;- encoding             ctx.Response.ContentLength &lt;- stream.LongLength             ctx.Response.Body.WriteAsync(stream, 0, stream.Length)  let FileResult x = FileResult x :> IResult  type IResultExtensions with     member this.FileResult = FileResult   let file (i: string) =     match dict.TryGetValue i with     | false, _ -> Results.NotFound()     | true, x -> Results.Extensions.FileResult(x.Mime, x.ContentEncoding, x.Bytes)   \/\/ ......  |> fun b -> b.Build() |> fun w ->     w.MapGet(\"\/{i}\", Func&lt;string, IResult>(fun i -> Files.file i))     |> ignore      w.Run()<\/code><\/pre>\n<p>  \u042f \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0441\u0451 \u043f\u043e \u0433\u0430\u0439\u0434\u0443, \u0437\u0430\u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u043b IResult, \u0437\u0430\u044d\u043a\u0441\u0442\u0435\u043d\u0434\u0438\u043b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0432\u0441\u0451, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/aspnet\/core\/fundamentals\/minimal-apis?view=aspnetcore-6.0#customizing-results\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 RPS \u043d\u0430 \u0444\u0430\u0439\u043b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 0 \u0431\u0430\u0439\u0442 \u0432\u044b\u0440\u043e\u0441 \u0434\u043e 26852,44, \u0444\u0430\u0439\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 31\u041a\u0411 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f 5858.85 \u0440\u0430\u0437 \u0441 \u043e\u0431\u0449\u0435\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 573,77\u041c\u0411\/\u0441, \u0438 13869.81 \u0440\u0430\u0437 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 5,2\u0413\u0411\/\u0441 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<p>  \u042d\u0442\u043e 4,6 \u0433\u0438\u0433\u0430\u0431\u0438\u0442 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0438 41 \u0433\u0438\u0433\u0430\u0431\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0422\u0430\u0431\u043b\u0438\u0446\u044b<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/sh\/ie\/hb\/shiehbrbit0mh9si5ylu3vwznzw.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/sh\/ie\/hb\/shiehbrbit0mh9si5ylu3vwznzw.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0433\u0434\u0435 \u043f\u043e\u043b\u044f \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0431\u0443\u0434\u0443 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b. \u0422\u043e\u0433\u0434\u0430 \u0432 Dictionary \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u2014 \u0431\u0435\u0440\u0451\u043c \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043a\u0430\u043a \u0438 \u043f\u043e \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u0443, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u043a\u0430\u0442\u044c \u043e\u0442 \u043e\u0434\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u0439. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0437\u0430 \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u0424\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c, \u043c\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0431\u0435\u0440\u0451\u043c \u0438\u0445 \u0438\u0437 \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"cs\">let mimes = files |> Array.map extractMime  let encodings =     Array.init p.Length (fun _ -> StringValues \"none\")  let bytes =     files |> Array.map File.ReadAllBytes  \/\/ ......  let file (i: string) =     match dict.TryGetValue i with     | false, _ -> Results.NotFound()     | true, idx -> Results.Extensions.FileResult(mimes.[idx], encodings.[idx], bytes.[idx])<\/code><\/pre>\n<p>  RPS \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u043d\u0430 100 \u0438 150 \u0434\u043b\u044f 1 \u0438 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u041d\u0435 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b<\/font><\/h2>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 1. \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430<\/font><\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">let FileResult x = FileResult x :> IResult  \/\/type IResultExtensions with \/\/    member this.FileResult = FileResult  let file (i: string) =     match dict.TryGetValue i with     | false, _ -> Results.NotFound()     \/\/| true, idx -> Results.Extensions.FileResult(mimes.[idx], encodings.[idx], bytes.[idx])     | true, idx -> FileResult(mimes.[idx], encodings.[idx], bytes.[idx])<\/code><\/pre>\n<p>  \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u043e\u0440\u043e\u0433\u0438\u0435, \u0432\u044b, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u044d\u0442\u043e. \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u0434\u0435\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0438 \u043f\u043e\u0441\u0435\u0439 \u0434\u0435\u043d\u044c. \u0415\u0441\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0442\u0430\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 RPS \u0432\u044b\u0440\u043e\u0441 \u0434\u043e \u0435\u0449\u0451 \u043d\u0430 271.2, \u0434\u043e 27131.54. \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u0437\u0430\u0442\u043e \u0440\u0430\u0437\u0434\u0430\u0447\u0430 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0430\u0441\u044c \u043d\u0430 30\u041c\u0411\/\u0441.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 |<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 2. Task \u0432\u043c\u0435\u0441\u0442\u043e IResult<\/font><\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">let file (i: string) (ctx: HttpContext) =     match dict.TryGetValue i with     | false, _ ->         ctx.Response.StatusCode &lt;- 404         Task.CompletedTask     | true, idx ->         ctx.Response.ContentType &lt;- mimes.[idx]         ctx.Response.Headers.ContentEncoding &lt;- encodings.[idx]         let b = bytes.[idx]         ctx.Response.ContentLength &lt;- b.LongLength         ctx.Response.Body.WriteAsync(b, 0, b.Length)<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 IResult, \u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u0442\u043e\u0433\u043e IResult. \u0415\u0441\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430 Task, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0438\u0433\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0442\u0430\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u0422\u0430\u043a \u043c\u044b \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u043c\u0441\u044f \u0435\u0449\u0451 \u043d\u0430 410.53 RPS, \u0434\u043e 27542.07. \u0420\u0430\u0437\u0434\u0430\u0447\u0430 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0430\u0441\u044c \u043d\u0430 10\u041c\u0411\/\u0441, \u0430 \u0440\u0430\u0437\u0434\u0430\u0447\u0430 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043d\u0430 16\u041c\u0411\/\u0441.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 | |              Tables_Task |  51.40 us | 0.757 us | 0.708 us |            114 |                     190 |          16,730 |<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 3. \u0422\u043e\u043b\u044c\u043a\u043e Httpcontext<\/font><\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/let extractFileName (x: string) = x.LastIndexOf \"\\\\\" + 1 |> x.Substring let extractFileName (x: string) =     \"\/\" + (x.LastIndexOf \"\\\\\" + 1 |> x.Substring)  \/\/ ......  \/\/let file (i: string) (ctx: HttpContext) = let file (ctx: HttpContext) =     \/\/match dict.TryGetValue i with     match dict.TryGetValue ctx.Request.Path.Value with     | false, _ ->         ctx.Response.StatusCode &lt;- 404         Task.CompletedTask     | true, idx ->         ctx.Response.ContentType &lt;- mimes.[idx]         ctx.Response.Headers.ContentEncoding &lt;- encodings.[idx]         let b = bytes.[idx]         ctx.Response.ContentLength &lt;- b.LongLength         ctx.Response.Body.WriteAsync(b, 0, b.Length)<\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u0442\u0430\u0441\u043a, \u0445\u043e\u0442\u044c \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 IResult, \u043e\u043d\u0430 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u0443\u0435\u0442 String \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u0432\u044b\u0437\u043e\u0432. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u0438\u0437 HttpContext\u2019\u0430, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<p>  \u0418 bombardier \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 | |              Tables_Task |  51.40 us | 0.757 us | 0.708 us |            114 |                     190 |          16,730 | |       Tables_TaskNoAlloc |  50.95 us | 0.614 us | 0.575 us |            105 |                     184 |          16,423 |<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 4. \u0421\u0432\u043e\u044f \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u044c<\/font><\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/qy\/jd\/jm\/qyjdjmuhru41lurrkcyojq_mbni.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/qy\/jd\/jm\/qyjdjmuhru41lurrkcyojq_mbni.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0438\u043d\u0433, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0432\u0443\u0445 \u0441\u0442\u0440\u043e\u043a, \u043f\u0443\u0442\u0438 \u0438\u0437 URL \u0438 HTTP \u043c\u0435\u0442\u043e\u0434\u0430. \u0422\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u042d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043d\u043e \u043c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u043c PUT, DELETE \u0438 POST, \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a GET, \u043f\u0440\u043e CORS \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u0438 \u043d\u0430\u043c \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0434\u0432\u0430 \u043e\u0432\u0435\u0440\u043b\u043e\u0430\u0434\u0430, \u00abFunc&lt;HttpContext,Func,Task>\u00bb \u0438 \u00abFunc&lt;HttpContext,RequestDelegate,Task>\u00bb<\/p>\n<p>  \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 Func, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u043e\u0432\u0435\u0440\u043b\u043e\u0430\u0434 \u0441 RequestDelegate.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u044c:<\/p>\n<pre><code class=\"cs\">let file (ctx: HttpContext) ( next: RequestDelegate) =     match dict.TryGetValue ctx.Request.Path.Value with     | false, _ -> next.Invoke ctx          | true, idx ->         ctx.Response.ContentType &lt;- mimes.[idx]         ctx.Response.Headers.ContentEncoding &lt;- encodings.[idx]         let b = bytes.[idx]         ctx.Response.ContentLength &lt;- b.LongLength         ctx.Response.Body.WriteAsync(b, 0, b.Length)<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0435\u0451 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f:<\/p>\n<pre><code class=\"cs\">|> fun b -> b.Build() |> fun w ->     w.Use Files.file |> ignore     w.UseRouting() |> ignore     w.Run()<\/code><\/pre>\n<p>  \u041e\u043f\u0443\u0441\u0442\u0438\u0432 \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, RPS \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u043d\u0430 985.48, \u0434\u043e 28527.55. \u0420\u0430\u0437\u0434\u0430\u0447\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 1 \u043f\u043e\u0442\u043e\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0430\u0441\u044c \u0435\u0449\u0451 \u043d\u0430 6\u041c\u0411\/\u0441, \u0430 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043d\u0430 21\u041c\u0411\/\u0441.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 | |              Tables_Task |  51.40 us | 0.757 us | 0.708 us |            114 |                     190 |          16,730 | |       Tables_TaskNoAlloc |  50.95 us | 0.614 us | 0.575 us |            105 |                     184 |          16,423 | |        Tables_Middleware |  48.95 us | 0.977 us | 1.045 us |            109 |                     181 |          16,031 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u2014 Unsafe<\/font><\/h2>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d Unsafe.As<\/font><\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ou\/by\/ry\/oubyryxs16mwyl2jqszl1o8hrsw.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/ou\/by\/ry\/oubyryxs16mwyl2jqszl1o8hrsw.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u042d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c string \u043a\u0430\u043a byte[], \u043d\u0435 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0435\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432, \u0442\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c, \u0447\u0435\u0440\u0435\u0437 for \u0438\u043b\u0438 foreach, \u043d\u043e \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c enumerator, \u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u043f\u0430\u0434\u0451\u0442 \u0441 (Fatal error. Internal CLR error. (0x80131506).<\/p>\n<p>  \u0422\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u0430\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u042d\u043d\u0443\u043c\u0435\u0442\u0430\u0440\u0442\u043e\u0440\u044b <code>string<\/code> \u0438 <code>'T[]<\/code> \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ut\/wk\/nc\/utwkncccetpg__g0plthku8vrhi.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/ut\/wk\/nc\/utwkncccetpg__g0plthku8vrhi.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440. \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c int64 \u043a\u0430\u043a byte[], \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0430\u0439\u0442 \u0432 \u044d\u0442\u043e\u043c int64 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c int64 \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d Unsafe.Add<\/font><\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/du\/xw\/86\/duxw86fdjl-dyuyv8ojd9oyhqc8.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/du\/xw\/86\/duxw86fdjl-dyuyv8ojd9oyhqc8.jpeg\" data-blurred=\"true\"\/><\/p>\n<pre><code class=\"cs\">[&lt;Test>] let MutateString () =     let mutable s = \"abcde\"     let mutable res: char array = Unsafe.As &amp;s      let ref =         &amp;MemoryMarshal.GetArrayDataReference res      \/\/ \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044d\u0442\u043e 8 \u0431\u0430\u0439\u0442     \/\/ \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0440\u043e\u043a\u0438 \u044d\u0442\u043e 4 \u0431\u0430\u0439\u0442\u0430     \/\/ \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u0432\u043b\u0435\u0432\u043e     \/\/ \u0435\u0449\u0451 \u043d\u0430 2 char'a, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 4 \u0431\u0430\u0439\u0442\u0430     for i = -2 to s.Length - 3 do         Unsafe.Add(&amp;ref, i) &lt;- '-'      printfn \"%s\" s     Assert.AreEqual(\"-----\", s)<\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0433\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0430\u043c\u0438. \u0412\u043e\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043c\u0443\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0432 string \u043a\u0430\u043a, char[].<\/p>\n<p>  \u0421\u043c\u0435\u0441\u0442\u0438\u0432 \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u0435\u0449\u0451 \u043d\u0430 4 \u0431\u0430\u0439\u0442\u0430 \u0432\u043b\u0435\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0438\u0437\u043c\u0435\u043d\u044f\u044f \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 voidptr\u2019\u0430\u043c\u0438 \u0438 intptr\u2019\u0430\u043c\u0438. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u2014 \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 fixed. \u0422\u0430\u043a \u0432\u043e\u0442, \u043a \u0447\u0435\u043c\u0443 \u044f \u044d\u0442\u043e?<\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0451 \u0432 \u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0441\u0438\u0432<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/8l\/5h\/9k\/8l5h9kkwbpowuqznaft05nb0ao8.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/8l\/5h\/9k\/8l5h9kkwbpowuqznaft05nb0ao8.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u041b\u0438\u043d\u0438\u044f \u043a\u044d\u0448\u0430 \u0441\u043a\u0430\u0439\u043b\u0435\u0439\u043a\u043e\u0432 \u2014 64 \u0431\u0430\u0439\u0442\u0430, 64 \u0431\u0430\u0439\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 \u043a\u044d\u0448 \u0437\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u0445\u043e\u0434 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u043a \u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0435\u0444\u0435\u0442\u0447\u0435\u0440 \u0443\u0436\u0435 \u043d\u0430\u0447\u043d\u0451\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435. \u0412\u0441\u0451 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0438 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0435 8 \u0431\u0430\u0439\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044d\u0442\u043e long \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0434\u043b\u0438\u043d\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 Content-Encoding, \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 N+1 \u0431\u0430\u0439\u0442 \u2014 \u044d\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 Content-Type, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430 \u043d\u0438\u043c\u0438 N+1 \u0431\u0430\u0439\u0442\u044b \u044d\u0442\u043e Content-Length \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442\u043e\u0432 \u0437\u0430 \u043d\u0438\u043c \u044d\u0442\u043e \u0431\u0430\u0439\u0442\u044b \u0444\u0430\u0439\u043b\u0430 lenna.webp. \u041a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u0435.<\/p>\n<pre><code class=\"cs\">let enc = UTF8Encoding false  [&lt;Struct>] type LongBytes =     { A: byte       B: byte       C: byte       D: byte       E: byte       F: byte       G: byte       H: byte }  let inlineFileBytes =     fun f ->         let mimeBytes =             extractMime f |> enc.GetBytes          let mutable mimeBytesLongLength =             mimeBytes.LongLength          let mimeLen: LongBytes =             Unsafe.As(&amp;mimeBytesLongLength)          let encodingBytes = \"none\" |> enc.GetBytes          let mutable mimeBytesLongLength =             encodingBytes.LongLength          let encLen: LongBytes =             Unsafe.As(&amp;mimeBytesLongLength)          let mutable fileBytes = File.ReadAllBytes f          let mutable fileBytesLongLength =             fileBytes.LongLength          let fileLen: LongBytes =             Unsafe.As(&amp;fileBytesLongLength)           [| [| mimeLen.A               mimeLen.B               mimeLen.C               mimeLen.D               mimeLen.E               mimeLen.F               mimeLen.G               mimeLen.H |]            mimeBytes             [| encLen.A               encLen.B               encLen.C               encLen.D               encLen.E               encLen.F               encLen.G               encLen.H |]            encodingBytes             [| fileLen.A               fileLen.B               fileLen.C               fileLen.D               fileLen.E               fileLen.F               fileLen.G               fileLen.H |]            fileBytes |]         |> Array.concat         |> Array.pin<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u0430\u043a \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0430\u0439\u0442 Int64 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432.<\/p>\n<pre><code class=\"cs\">let file (ctx: HttpContext) (next: RequestDelegate) =     match dict.TryGetValue ctx.Request.Path.Value with     | false, _ -> next.Invoke ctx     | true, arr ->         let spanRef =             &amp;arr.AsSpan().GetPinnableReference()          let mimeLen: int32 =             Unsafe.ReadUnaligned(&amp;spanRef)          ctx.Response.ContentType &lt;- enc.GetString(arr, 8, mimeLen)          let encStart = mimeLen + 8          let encLen: int32 =             Unsafe.ReadUnaligned(&amp;Unsafe.Add(&amp;spanRef, encStart))          ctx.Response.Headers.ContentEncoding &lt;- enc.GetString(arr, encStart + 8, encLen)          let fileStart = encStart + encLen + 8          let mutable fileSize: int64 =             Unsafe.ReadUnaligned(&amp;Unsafe.Add(&amp;spanRef, fileStart))          ctx.Response.ContentLength &lt;- fileSize          ctx.Response.Body.WriteAsync(arr, fileStart + 8, Unsafe.As(&amp;fileSize))<\/code><\/pre>\n<p>  \u0427\u0442\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0441\u0442\u0440\u043e\u0438\u043b\u0438. \u0427\u0438\u0442\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 8 \u0431\u0430\u0439\u0442 \u043a\u0430\u043a \u0434\u043b\u0438\u043d\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c long, \u0430 \u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a int, \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b.<\/p>\n<p>  \u0427\u0442\u043e \u0435\u0449\u0451 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 Jit \u0432\u0441\u0442\u0440\u043e\u0438\u043b \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. ASM \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0442\u043d\u043e \u0434\u043b\u0438\u043d\u043e\u0439 \u0432 7030 \u0431\u0430\u0439\u0442. 175 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u0412\u043e\u0442 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 Jit<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">    ; Assembly listing for method Files:file(HttpContext,RequestDelegate):Task     ; Emitting BLENDED_CODE for X64 CPU with AVX - Windows     ; Tier-1 compilation     ; optimized code     ; optimized using profile data     ; rsp based frame     ; fully interruptible     ; with Dynamic PGO: edge weights are invalid, and fgCalledCount is 63369     ; 63 inlinees with PGO data; 109 single block inlinees; 3 inlinees without PGO data     ......     ; Total bytes of code 7030<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  RPS \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0435\u0449\u0451 \u043d\u0430 179.44, \u0434\u043e 28706.99. \u0414\u0430\u0436\u0435 BenchmarkDotnet \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 | |              Tables_Task |  51.40 us | 0.757 us | 0.708 us |            114 |                     190 |          16,730 | |       Tables_TaskNoAlloc |  50.95 us | 0.614 us | 0.575 us |            105 |                     184 |          16,423 | |        Tables_Middleware |  48.95 us | 0.977 us | 1.045 us |            109 |                     181 |          16,031 | |         InlineEverything |  49.97 us | 0.752 us | 0.666 us |             98 |                     190 |          15,784 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0451 \u0432 \u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0441\u0438\u0432 v2<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/l2\/uy\/lj\/l2uyljfemdatbodejnxollrcsae.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/l2\/uy\/lj\/l2uyljfemdatbodejnxollrcsae.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0411\u0440\u0430\u0442\u044c \u0432\u0441\u0451 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u0438\u0437 \u0431\u0430\u0439\u0442\u043e\u0432 \u043c\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u044d\u0442\u043e \u044d\u043d\u0443\u043c\u044b, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 Content-Encoding, \u0438 Content-Type, \u0430 \u0431\u0430\u0439\u0442\u044b \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 2 \u043f\u043e 10 \u044d\u0442\u043e long, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0434\u043b\u0438\u043d\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u0412\u0441\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043e\u043c\u043f\u0438\u043b\u0435\u043d\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<pre><code class=\"cs\">let file (ctx: HttpContext) (next: RequestDelegate) =     match dict.TryGetValue ctx.Request.Path.Value with     | false, _ -> next.Invoke ctx     | true, arr ->         ctx.Response.ContentType &lt;- Unsafe.As &amp;arr.[0] |> ContentType.toString          ctx.Response.Headers.ContentEncoding &lt;-             Unsafe.As &amp;arr.[1]             |> ContentEncoding.toStringValues          ctx.Response.ContentLength &lt;- (Unsafe.As &amp;arr.[2]: int64)         ctx.Response.Body.WriteAsync(arr, 10, Unsafe.As &amp;arr.[2])<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434. \u041b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a \u0436\u0435 \u043e\u0442\u0440\u0430\u0437\u0438\u043b\u0430\u0441\u044c \u0438 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0422\u0435\u043b\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u043e\u0445\u0443\u0434\u0435\u043b\u043e \u043d\u0430 1904 \u0431\u0430\u0439\u0442, \u0434\u043e 5126 \u0431\u0430\u0439\u0442.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 Jit \u043f\u043e\u0441\u043b\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">    ; Assembly listing for method Files:file(HttpContext,RequestDelegate):Task     ; Emitting BLENDED_CODE for X64 CPU with AVX - Windows     ; Tier-1 compilation     ; optimized code     ; optimized using profile data     ; rsp based frame     ; fully interruptible     ; with Dynamic PGO: edge weights are invalid, and fgCalledCount is 83072     ; 49 inlinees with PGO data; 96 single block inlinees; 3 inlinees without PGO data     ......     ; Total bytes of code 5126<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  RPS \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f, \u043d\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0430\u0447\u0438 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u043d\u0430 26\u041c\u0411\/\u0441, \u0430 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0430 15\u041c\u0411\/\u0441, \u0447\u0442\u043e \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u0447\u0451\u0442\u0435 \u0434\u0430\u0451\u0442 \u043d\u0430\u043c 621,72\u041c\u0411\/\u0441 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0438 5,85\u0413\u0411\/\u0441 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0430 \u044d\u0442\u043e \u0431\u0435\u0437 \u043c\u0430\u043b\u043e\u0433\u043e 5 \u0438 46,8 \u0433\u0438\u0433\u0430\u0431\u0438\u0442 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  BanchmarkDotnet \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434, \u0443\u0432\u044b, \u043c\u0435\u043d\u0435\u0435 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u0435\u043d \u043a \u0436\u0435\u043b\u0435\u0437\u0443.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 | |              Tables_Task |  51.40 us | 0.757 us | 0.708 us |            114 |                     190 |          16,730 | |       Tables_TaskNoAlloc |  50.95 us | 0.614 us | 0.575 us |            105 |                     184 |          16,423 | |        Tables_Middleware |  48.95 us | 0.977 us | 1.045 us |            109 |                     181 |          16,031 | |         InlineEverything |  49.97 us | 0.752 us | 0.666 us |             98 |                     190 |          15,784 | |              FsharpFinal |  48.85 us | 0.966 us | 2.405 us |            120 |                     205 |          16,394 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u043e\u0440\u0442 \u043d\u0430 C#<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/wl\/42\/ou\/wl42ouvocdhfsxohrvuzm3a18bm.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/wl\/42\/ou\/wl42ouvocdhfsxohrvuzm3a18bm.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 F# \u0438 C#, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442 \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 IL. \u0412\u0441\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u0438\u0432\u0451\u043b, \u0445\u043e\u0440\u043e\u0448\u043e \u043b\u044f\u0433\u0443\u0442 \u0438 \u043d\u0430 \u043d\u0430\u0448 C# \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f.<\/p>\n<p>  \u0412 F#, Unsafe.As \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043a\u0430\u0441\u0442\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043e \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u043a\u0430\u043a \u0441 \u043b\u044e\u0431\u044b\u043c \u0442\u0438\u043f\u043e\u043c. C# \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u043a\u0440\u0443\u0442\u0430\u0441\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0434\u0430\u0451\u0442.<\/p>\n<p>  Unsafe.As \u0431\u044b\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d \u0434\u043b\u044f \u0430\u043d\u0431\u043e\u043a\u0441\u0438\u043d\u0433\u0430 \u0438 \u0432 \u0442\u0435\u043e\u0440\u0438\u0438, \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441 \u0442\u0430\u0439\u043f\u0430\u043c\u0438, \u043e\u0434\u043d\u0430\u043a\u043e, \u043e\u0431 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0435\u0442 C# \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, F# \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0442\u0430\u043a, \u043a\u0430\u043a \u0442\u044b \u0437\u0430\u0445\u043e\u0447\u0435\u0448\u044c.<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0430\u043c\u0438 \u0442\u043e\u0436\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, Unsafe.Add \u0432 C# \u0441\u0434\u0432\u0438\u0433\u0430\u0435\u0442 \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 sizeof&lt;\u2019T>, \u0433\u0434\u0435 \u2018T \u044d\u0442\u043e \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>  F# \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0430\u043c\u0438 \u043a\u0430\u043a \u0434\u043e \u043f\u0435\u0440\u0435\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438, \u0441\u0434\u0432\u0438\u0433\u0430\u044f \u043f\u043e\u0438\u043d\u0442\u0435\u0440 \u043d\u0430 sizeof&lt;\u2019T>, \u0433\u0434\u0435 \u2018T \u044d\u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u044d\u0442\u043e \u0442\u043e, \u0441 \u0447\u0435\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f, \u043f\u043e\u043a\u0430 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b.<\/p>\n<p>  ASM, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0432 \u043f\u043e\u0440\u0442\u0435, \u043d\u0430 208 \u0431\u0430\u0439\u0442 \u0434\u043b\u0438\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043d\u0430 F#. C# \u043d\u0435 \u0434\u0430\u0451\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<p>  \u0412 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a, \u043f\u043e\u0440\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u043d\u0430 20\u041c\u0411\/\u0441, \u0438 \u043d\u0430 29\u041c\u0411\/\u0441 \u0432 125 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 C# \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u043d\u0430 160 \u0438 232 \u043c\u0435\u0433\u0430\u0431\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 170.10 us | 1.328 us | 1.243 us |            141 |                     328 |          18,083 | |                 InMemory |  51.67 us | 1.028 us | 1.142 us |            101 |                     193 |          16,888 | |                   Tables |  51.56 us | 0.931 us | 0.870 us |            101 |                     185 |          16,119 | | Tables_WithoutInterfaces |  52.04 us | 0.640 us | 0.599 us |            108 |                     175 |          16,251 | |              Tables_Task |  51.40 us | 0.757 us | 0.708 us |            114 |                     190 |          16,730 | |       Tables_TaskNoAlloc |  50.95 us | 0.614 us | 0.575 us |            105 |                     184 |          16,423 | |        Tables_Middleware |  48.95 us | 0.977 us | 1.045 us |            109 |                     181 |          16,031 | |         InlineEverything |  49.97 us | 0.752 us | 0.666 us |             98 |                     190 |          15,784 | |              FsharpFinal |  48.85 us | 0.966 us | 2.405 us |            120 |                     205 |          16,394 | |              CsharpFinal |  49.45 us | 0.985 us | 1.590 us |            112 |                     189 |          16,469 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">FULL PGO<\/font><\/h2>\n<p>  \u041f\u043e\u043a\u0430 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438, \u044f \u043f\u043e\u0434\u043b\u043e \u0443\u0442\u0430\u0438\u0432\u0430\u043b \u043e\u0442 \u0432\u0430\u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0443\u044e, \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u0435 \u0442\u0430\u043a \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0435.<\/p>\n<p>  \u042d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430, \u0443\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c if\/else \u0438 \u0441\u0432\u0438\u0442\u0447\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b \u043c\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f tier0 \u2014 \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f tier1, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044e \u043a\u043e\u0434.<\/p>\n<pre><code class=\"plaintext\">DOTNET_ReadyToRun=0<\/code><\/pre>\n<p>  Ready to run \u044d\u0442\u043e \u0444\u043e\u0440\u043c\u0430 ahead of time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, ASM \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u043d\u0435 \u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Jit&#8217;\u043e\u043c.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e R2R \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0445\u043e\u0442\u044f\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0434\u043e\u0442\u043d\u0435\u0442\u0430, \u0430 \u043f\u043e\u043a\u0430, R2R \u0440\u0430\u0434\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c.<\/p>\n<pre><code class=\"plaintext\">DOTNET_TC_QuickJitForLoops=1<\/code><\/pre>\n<p>  \u0426\u0438\u043a\u043b\u044b \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 tier1. \u0427\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b\u044b \u043f\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044e, \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 tier0, \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"plaintext\">DOTNET_TieredPGO=1<\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0430\u043c Profile Guided Optimization.<\/p>\n<p>  \u041f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u044d\u0442\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u0430\u044e\u0442 \u043e\u0441\u043e\u0431\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b.<\/p>\n<p>  \u042f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u043b \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0435\u0449\u0451 \u0440\u0430\u0437. \u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0438\u0441\u044c, \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u0432 \u043a\u044d\u0448 \u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"plaintext\">|                   Method |      Mean |    Error |   StdDev | CacheMisses\/Op | BranchMispredictions\/Op | LLCReference\/Op | |------------------------- |----------:|---------:|---------:|---------------:|------------------------:|----------------:| |                     Base | 184.60 us | 2.295 us | 2.147 us |            222 |                     497 |          20,967 | |                 InMemory |  56.59 us | 0.803 us | 0.751 us |            127 |                     241 |          17,654 | |                   Tables |  56.90 us | 1.033 us | 0.966 us |            124 |                     252 |          17,465 | | Tables_WithoutInterfaces |  56.36 us | 1.096 us | 1.606 us |            146 |                     273 |          18,370 | |              Tables_Task |  56.60 us | 1.094 us | 1.074 us |            149 |                     269 |          17,872 | |       Tables_TaskNoAlloc |  56.04 us | 1.094 us | 1.260 us |            158 |                     280 |          17,682 | |        Tables_Middleware |  55.30 us | 0.831 us | 0.778 us |            137 |                     261 |          17,711 | |         InlineEverything |  54.37 us | 1.087 us | 1.627 us |            144 |                     260 |          17,949 | |              FsharpFinal |  53.97 us | 1.026 us | 1.098 us |            148 |                     250 |          17,646 | |              CsharpFinal |  54.08 us | 1.053 us | 1.081 us |            156 |                     267 |          17,466 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0422\u0435\u0441\u0442\u0438\u043c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435<\/font><\/h2>\n<p>  \u0410 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0432\u043e\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0441\u0432\u043e\u0438 \u0430\u043f\u0438\u0448\u043a\u0438 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c.<\/p>\n<p>  \u041c\u044b \u043f\u0438\u043b\u0438\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e API \u0438 \u043a\u0430\u043a \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p>  \u041d\u0443 \u0430 \u043f\u043e\u043a\u0430 \u043e\u043d\u0430 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u044f \u0437\u0430\u0448\u0451\u043b \u043d\u0430 <a href=\"https:\/\/ruvds.com\/ru-rub\">\u0441\u0430\u0439\u0442 RUVDS<\/a>, \u043a\u0443\u043f\u0438\u043b \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430 Windows Server 2022. \u0412\u0435\u0440\u0431\u043e\u0437\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043a\u0443\u043f\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0430\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>  <a href=\"https:\/\/ruvds.com\/ru-rub\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/lu\/pe\/tw\/lupetwokwmlyh7twjsggcru01ps.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/lu\/pe\/tw\/lupetwokwmlyh7twjsggcru01ps.png\"\/><\/div>\n<p><\/a><br \/>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0451\u043b \u0444\u0430\u0439\u043b\u0430\u043c\u0438 0\u041a\u0411 \u0438 3,5\u041a\u0411. \u042d\u0442\u043e \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u043d\u043e \u043f\u043e\u0439\u0434\u0451\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043c\u043e\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0435\u0442\u044c \u043d\u0435 \u0441\u0442\u0430\u043b\u0430 \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c, \u044f \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0435\u0442\u0438 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u043b\u0430 85\u041c\u0431\u0441.<\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0430\u043c\u0443\u044e \u043f\u0435\u0440\u0432\u0443\u044e \u0438 \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u043c 3,5\u041a\u0411:<\/p>\n<pre><code class=\"plaintext\">|                  | \u041f\u043e\u0442\u043e\u043a\u0438  | \u0423\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0426\u041f |  RPS    |  StdDev | |------------------|---------|:--------------|---------|---------| | Base             | 22      | 52%           | 2579.06 | 455.11  | | InlineEverything | 16      | 15%           | 2984.72 | 329.30  | | FsharpFinal      | 16      | 14%           | 2990.31 | 315.68  |<\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u043c 0 \u0431\u0430\u0439\u0442:<\/p>\n<pre><code class=\"plaintext\">|                  | \u041f\u043e\u0442\u043e\u043a\u0438 | \u0423\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0426\u041f | RPS      | StdDev  | |------------------|--------|:--------------|----------|---------| | Base             | 125    | 100%          | 6607.07  | 1625.44 | | InlineEverything | 125    | 47%           | 20105.82 | 2929.65 | | FsharpFinal      | 125    | 44%           | 19986.56 | 2860.83 |<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/font><\/h2>\n<p>  \u0412\u044b\u0432\u043e\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0443 \u2014 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0440\u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e. \u041b\u0443\u0447\u0448\u0435 \u0431\u044b \u044f \u0442\u0440\u0430\u0432\u0443 \u043d\u0430 \u0443\u043b\u0438\u0446\u0435 \u0442\u0440\u043e\u0433\u0430\u043b, \u0447\u0435\u0441\u0441\u043b\u043e\u0432\u043e.<\/p>\n<p>  \u041d\u043e \u044f \u0443\u0437\u043d\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0438 \u0432\u044b \u0442\u043e\u0436\u0435 \u0443\u0437\u043d\u0430\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435, \u043d\u043e\u0432\u043e\u0435, \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<\/p>\n<blockquote><p><b><font color=\"#3AC1EF\"><a href=\"http:\/\/bit.do\/ruvds-community\">Telegram-\u043a\u0430\u043d\u0430\u043b \u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u044f\u043c\u0438<\/a> \u0438 <a href=\"http:\/\/bit.do\/ruvds-chat\">\u0443\u044e\u0442\u043d\u044b\u0439 \u0447\u0430\u0442<\/a><\/font><\/b><\/p><\/blockquote>\n<p><a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=oldadmin&amp;utm_content=kak_ya_sdelal_samyj_bystryj_v_mire_fajlovyj_server\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/sz\/7j\/pf\/sz7jpfj8i1pa6ocj-eia09dev4q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/sz\/7j\/pf\/sz7jpfj8i1pa6ocj-eia09dev4q.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/695808\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/695808\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/695808\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ir\/5g\/6e\/ir5g6eft0nx8f2zolurucr2ns3o.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ir\/5g\/6e\/ir5g6eft0nx8f2zolurucr2ns3o.png\"\/><\/div>\n<p><\/a><br \/>  \u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e HTTP \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 \u00abcontent-encoding\u00bb, \u00abmime-type\u00bb \u0438 \u00abcontent-lenght\u00bb. \u0418 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u2014 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0445\u043e\u0441\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0430\u0440\u044c\u0435\u0440\u044b. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0434\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Kestrel, .NET 7 RC 1, minimal API \u0438 F#. \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0435\u0441\u0442\u044c \u0438 \u0434\u043b\u044f C#.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-340536","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=340536"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340536\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}