{"id":308156,"date":"2020-08-07T15:00:54","date_gmt":"2020-08-07T15:00:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308156"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-08-07T15:00:54","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308156","title":{"rendered":"\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b: \u0447\u0442\u043e \u0432\u044b\u0433\u043e\u0434\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Golang?"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/514240\/\"><b><i>\u041f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 OTUS \u043e\u0442\u043a\u0440\u044b\u0442 \u043d\u0430\u0431\u043e\u0440 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/j3vi\/\">\u00ab\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Golang\u00bb<\/a>. \u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0435\u0433\u0438.<\/i><\/b><\/p>\n<hr>\n<p>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0438 \u043a\u043e\u043f\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 Golang, \u0438 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u0433\u043e\u0434\u043d\u0435\u0435 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3> \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430? <\/h3>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u2014 \u044d\u0442\u043e \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f. \u0414\u0430, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043d\u043e \u0432 Go \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e <a href=\"http:\/\/golang-book.ru\/chapter-09-structs-and-interfaces.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3> \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c?<\/h3>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043d\u0438\u0433\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0443 C \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430, \u0447\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0432 \u043d\u0438\u0445 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043d\u0435\u0442, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e \u0432 <a href=\"http:\/\/golang-book.ru\/chapter-08-pointers.html\"> go \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0435<\/a><\/p>\n<h4> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"plaintext\">type S struct { \ta, b, c int64 \td, e, f string \tg, h, i float64 } <\/code><\/pre>\n<p>  \u041d\u0438\u0436\u0435 \u0443 \u043d\u0430\u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043f\u0438\u0438 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b:<\/p>\n<pre><code class=\"plaintext\">func asCopy() S { \treturn S{ \t\ta: 10, b: 20, c: 30, \t\te: &quot;data&quot;, f: &quot;foo&quot;, \t\tg: 1.0, h: 2.0, i: 3.0, \t} } <\/code><\/pre>\n<p>  \u0410 \u0437\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"plaintext\">func asPointer() *S { \treturn &amp;S{ \t\ta: 10, b: 20, c: 30, \t\te: &quot;data&quot;, f: &quot;foo&quot;, \t\tg: 1.0, h: 2.0, i: 3.0, \t} } <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0432\u0430 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430, \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u0430\u043a \u043a\u043e\u043f\u0438\u0438:<\/p>\n<pre><code class=\"plaintext\">func BenchmarkMemoryStack(b *testing.B){ \tvar s S \tf, err :=os.Create(&quot;stack.out&quot;) \tif err != nil{ \tpanic(err) } defer f.Close() err = trace.Start(f) if err != nil{ \tpanic(err) }  for i:= 0; i &lt; b.N; i++{ \ts = byCopy() }  trace.Stop()  b.StopTimer()  _ = fmt.Sprintf(&quot;%v&quot;, s.a) }  <\/code><\/pre>\n<p>   \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c:<\/p>\n<pre><code class=\"plaintext\">func BenchMemoryHeap(b *testing.B) {    var s *S     f, err := os.Create(&quot;heap.out&quot;)    if err != nil {       panic(err)    }    defer f.Close()     err = trace.Start(f)    if err != nil {       panic(err)    }     for i := 0; i &lt; b.N; i++ {       s = byPointer()    }     trace.Stop()     b.StopTimer()     _ = fmt.Sprintf(&quot;%v&quot;, s.a) }  <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0438 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438:<\/p>\n<pre><code class=\"bash\">go test .\/... -bench=BenchmarkMemoryHeap -benchmem -run=^$ -count=10 &gt; head.txt &amp;&amp; benchstat head.txt go test .\/... -bench=BenchmarkMemoryStack -benchmem -run=^$ -count=10 &gt; stack.txt &amp;&amp; benchstat stack.txt <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u044f \u0441 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c:<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td colspan=\"2\"> <b> MemoryHeap <\/b><\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>time\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryHeap-4 <\/td>\n<td>75.0ns \u00b1 5%<\/td>\n<\/tr>\n<tr>\n<td>name <\/td>\n<td>alloc\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryHeap-4 <\/td>\n<td>96.0B \u00b1 0%<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>allocs\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryHeap-4<\/td>\n<td>1.00 \u00b1 0%<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"> <b> MemoryStack <\/b><\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>time\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryStack-4<\/td>\n<td>8.93ns \u00b1 4%<\/td>\n<\/tr>\n<tr>\n<td>name <\/td>\n<td>alloc\/op<\/td>\n<\/tr>\n<tr>\n<td> MemoryStack-4 <\/td>\n<td>0.00B<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>allocs\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryStack-4<\/td>\n<td>0.00<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043f\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u0430\u0435\u0442 8-\u043a\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.<br \/>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0433\u0440\u0430\u0444\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0439\u0441\u043e\u043c. \u041f\u0435\u0440\u0432\u044b\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0433\u0440\u0430\u0444, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443 \u043d\u0430\u0441 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u043a\u043e\u043f\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yh\/er\/jt\/yherjtafqkilpcrrxjpbeoxbgbg.png\" alt=\"\u0441\u0433\u0435\u043d\u0435\u0440\u0435\u0440\u0438\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043f\u0438\u0438\"><\/p>\n<p>  \u041f\u043e\u0442\u043e\u043c \u0433\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sf\/gj\/fz\/sfgjfzezcukiv9eyr2srqy58dre.png\" alt=\"\u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439\"><\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0433\u0440\u0430\u0444 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0422\u0430\u043c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0443\u0447\u0430, \u0438 \u043d\u0435\u0442 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u044b.<\/p>\n<p>  \u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0433\u0440\u0430\u0444\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u0437 \u043a\u0443\u0447\u0438 \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430. \u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u043c \u0433\u0440\u0430\u0444, \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0436\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cn\/qu\/mo\/cnqumozd4a6msdstnf0ecgkq4vm.png\"><\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0433\u0440\u0430\u0444\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0435 4ms.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c \u043e\u043f\u044f\u0442\u044c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0r\/zf\/bh\/0rzfbhpoczj_4xbvpchflgrgv2y.png\"><\/p>\n<p>  \u0413\u043e\u043b\u0443\u0431\u0430\u044f, \u0440\u043e\u0437\u043e\u0432\u0430\u044f \u0438 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0442 \u0444\u0430\u0437\u044b \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0440\u0438\u0447\u043d\u0435\u0432\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u0443\u0447\u0438 (\u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043e \u043d\u0430 &quot;<code>runtime.bsweep<\/code>&quot; \u043d\u0430 \u044d\u0442\u043e\u043c \u0433\u0440\u0430\u0444\u0435).<br \/>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u0430\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c, \u043e\u043d \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0443\u0447\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u0441\u0442\u0435\u043a\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u043e\u0434 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u0441\u0442\u0435\u043a\u0435 \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0435\u0435, \u0447\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0432 \u043a\u0443\u0447\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0435\u043a\/\u043a\u0443\u0447\u0430, \u043d\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e<a href=\"https:\/\/otus.ru\/nest\/post\/605\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435.<\/p>\n<h4> \u0418\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u0435\u0439\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0432\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u043a \u043d\u0430\u0448\u0438\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430\u043c.<\/p>\n<pre><code class=\"plaintext\">func (s S) stack(s1 S) {}  func (s *S) heap(s1 *S) {} <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u0442\u0435\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u0435 \u043a\u0430\u043a \u043a\u043e\u043f\u0438\u044e:<\/p>\n<pre><code class=\"plaintext\">func BenchMemoryStack(b * testing.B){ \tvar s S \tvar s1 S  \ts = byCopy() \ts1 = byCopy() \tfor i :=0; i&lt; b.N; i++{ \t\tfor i:0; i &lt; 10000; i++{ \t\t\ts.stack(s1) \t\t} \t} } <\/code><\/pre>\n<p>  \u0418 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u0434\u043b\u044f \u043a\u0443\u0447\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"plaintext\">func BenchMemoryHeap(b * testing.B){ \tvar s *S \tvar s1 *S  \ts = byPointer() \ts1 = byPointer() \tfor i: = 0; i &lt; b.N; i++{ \tfor i := 0; i &lt; 100000; i++{ \ts.heap(s1) \t\t} \t} } <\/code><\/pre>\n<p>  \u0412\u043f\u043e\u043b\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435:<\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td colspan=\"2\"> <b> MemoryHeap <\/b><\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>time\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryHeap-4 <\/td>\n<td>301\u00b5s \u00b1 4%<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>alloc\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryHeap-4 <\/td>\n<td>0.00B<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>allocs\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryHeap-4<\/td>\n<td>0.00<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"> <b> MemoryStack<\/b><\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>time\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryStack-4<\/td>\n<td>595\u00b5s \u00b1 2%<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>alloc\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryStack-4<\/td>\n<td>0.00B<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>allocs\/op<\/td>\n<\/tr>\n<tr>\n<td>MemoryStack-4<\/td>\n<td>0.00<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4> \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <\/h4>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 Go \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0443\u0447\u0448\u0430\u044f \u0438\u0434\u0435\u044f. \u0414\u043b\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 \u044d\u0442\u043e\u0442 <a href=\"https:\/\/www.ardanlabs.com\/blog\/2017\/06\/design-philosophy-on-data-and-semantics.html\">\u043f\u043e\u0441\u0442<\/a>. \u041e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u043f\u0440\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Golang.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0438\u043d\u0433 \u0432\u0430\u0448\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043a\u0443\u0447\u0435\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f:<\/p>\n<ul>\n<li> <a href=\"https:\/\/rtfm.co.ua\/golang-struct-struktury-v-primerax\/\"> \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0432 Golang<\/a><\/li>\n<li> <a href=\"http:\/\/unetway.com\/tutorial\/go-ukazateli\/\">\u041d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432 Golang<\/a><\/li>\n<li> <a href=\"https:\/\/fodor.org\/blog\/go-heap\/\"> \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0443\u0447\u0438 \u0432 Golang<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<hr>\n<p>  <a href=\"https:\/\/otus.pw\/j3vi\/\">\u0423\u0437\u043d\u0430\u0442\u044c \u043e \u043a\u0443\u0440\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/a><\/p>\n<hr>\n<p>  <\/p>\n<h2>\u0427\u0438\u0442\u0430\u0442\u044c \u0435\u0449\u0451:<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/465613\/\">\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c \u0438 \u0441\u0440\u0435\u0437\u0430\u043c \u0432 Golang<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/453806\/\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Go<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/503918\/\">\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Go: \u041f\u0440\u0430\u0433\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \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\/otus\/blog\/514240\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/514240\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/514240\/\"><b><i>\u041f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 OTUS \u043e\u0442\u043a\u0440\u044b\u0442 \u043d\u0430\u0431\u043e\u0440 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/j3vi\/\">\u00ab\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Golang\u00bb<\/a>. \u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0435\u0433\u0438.<\/i><\/b><\/p>\n<hr>\n<p>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0438 \u043a\u043e\u043f\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 Golang, \u0438 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u0433\u043e\u0434\u043d\u0435\u0435 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.   <\/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-308156","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308156","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=308156"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308156\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}