-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/blog: pprof example doesn't trigger reallocation #43963
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
vorishirne
changed the title
Code used in Golang pprof blog, to demonstrate performance of golang doesnt do what it does
Code used in Golang pprof blog, to demonstrate performance of golang doesn't comply against what expressed in the blog
Jan 28, 2021
Did you include a link to the blog post? |
Added in issue description, https://blog.golang.org/pprof |
seankhliao
changed the title
Code used in Golang pprof blog, to demonstrate performance of golang doesn't comply against what expressed in the blog
x/blog: pprof example doesn't trigger reallocation
Jan 28, 2021
seankhliao
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Jan 28, 2021
To add more context, printing here the diff of edited source code, and the output
For cpp code,
Program output :
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not related
What operating system and processor architecture are you using (
go env
)?i5/ubuntu
What did you do?
In the golang blog of pprof, they demonstrate the performance of golang via a benchmarking code and then comparing with cpp counterpart. The blog tells about reallocartion of memory and its time complexities in multiple loops.
The blog => https://blog.golang.org/pprof
So, I builded the examples mentioned in the havlak repository.
But to find out, that the variable "size" is static throught the execution, to be precise, 252013.
What did you expect to see?
The constant value of size parameter, doesn't triggers the the memory re-allocation, measuring whose cost is the most focused part of the blog.
What did you see instead?
As the blog uses the havlok example as a memory critical task, It isn't actually.
The text was updated successfully, but these errors were encountered: