Last active
May 30, 2019 08:00
-
-
Save life1347/fe79903dcad9673d8045ca24fccf5102 to your computer and use it in GitHub Desktop.
Revisions
-
life1347 revised this gist
May 30, 2019 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,10 @@ EmbedStruct without pool: 651.618531ms with pool: 84.505615ms # https://stackoverflow.com/questions/45003259/passing-an-optimization-flag-to-a-go-compiler # -N : Disable optimizations # -l : Disable inlining $ go run -gcflags '-N -l' ./p7uGl0JZ_TR.go NoEmbedStruct without pool: 139.720966ms @@ -16,7 +20,7 @@ EmbedStruct without pool: 672.334312ms with pool: 91.052924ms # new(Data) 改寫成 Data{b:make([]byte, 1024)} $ go run ./p7uGl0JZ_TR.go NoEmbedStruct -
life1347 revised this gist
May 30, 2019 . 1 changed file with 21 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,4 +14,24 @@ with pool: 97.43476ms EmbedStruct without pool: 672.334312ms with pool: 91.052924ms new(Data) 變成 Data{b:make([]byte, 1024)} $ go run ./p7uGl0JZ_TR.go NoEmbedStruct without pool: 1.330158ms with pool: 82.081171ms EmbedStruct without pool: 1.304114ms with pool: 80.288109ms $ go run -gcflags '-N -l' ./p7uGl0JZ_TR.go NoEmbedStruct without pool: 136.941637ms with pool: 94.261001ms EmbedStruct without pool: 102.397449ms with pool: 89.48266ms -
life1347 revised this gist
May 30, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ $ go run ./p7uGl0JZ_TR.go NoEmbedStruct without pool: 1.558109ms with pool: 89.337184ms @@ -7,7 +7,7 @@ EmbedStruct without pool: 651.618531ms with pool: 84.505615ms $ go run -gcflags '-N -l' ./p7uGl0JZ_TR.go NoEmbedStruct without pool: 139.720966ms with pool: 97.43476ms -
life1347 created this gist
May 30, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ $ go run ~/Downloads/p7uGl0JZ_TR.go NoEmbedStruct without pool: 1.558109ms with pool: 89.337184ms EmbedStruct without pool: 651.618531ms with pool: 84.505615ms $ go run -gcflags '-N -l' ~/Downloads/p7uGl0JZ_TR.go NoEmbedStruct without pool: 139.720966ms with pool: 97.43476ms EmbedStruct without pool: 672.334312ms with pool: 91.052924ms