Hi Alex, You may want to have logic tests in place to be sure your improvements are correct.
Capturing the complete call graph and CPU/memory usage using pprof may help reveal improvements. The visualization output has options you might want to adjust. Inspecting the assembly output is another thing to do. Do you have a specific platform target? The Go compiler may emit different assembly depending on the target platform. Looking at platform tradeoffs may reveal improvements like managing virtual memory pages and processor local memory caching. Others have mentioned algorithm improvements like adjusting the big-O function. Matt On Monday, May 14, 2018 at 7:22:00 PM UTC-5, Alex Dvoretskiy wrote: > > Hello Golang Nuts > > I'm trying to solve a problem. Algorithm is correct, but too slow. Perhaps > you can give me some ideas on how to improve running time? > > https://play.golang.org/p/XsXwT8EHtwC > > > Thanks > Alex > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.