• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ezgliding / goigc
86%
master: 68%

Build:
Build:
LAST BUILD BRANCH: binder
DEFAULT BRANCH: master
Repo Added 07 Aug 2017 01:16PM UTC
Files 11
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH pprof
branch: pprof
CHANGE BRANCH
x
Reset
  • pprof
  • annealing
  • benchtests
  • binder
  • buildfix
  • coverage
  • dep
  • docker
  • docs
  • goldentest
  • imports
  • master
  • modules
  • optimize
  • parselocation
  • pointtests
  • pprofdist
  • release
  • s2
  • thermal
  • vendor

pending completion
57

push

travis-ci

rochaporto
Improve Task.Distance by not allocating new slices

pprof analysis showed the following results:

     0.95s  2.13%  3.01%     30.22s 67.86%
github.com/ezgliding/goigc.(*Task).Distance
     2.54s  5.70%  8.71%     16.31s 36.63%  runtime.growslice
     3.56s  7.99% 16.71%     15.55s 34.92%  runtime.mallocgc
     0.48s  1.08% 17.79%     11.55s 25.94%
github.com/ezgliding/goigc.(*Point).Distance

which shows a big issue with slice allocation between the Task.Distance
and Point.Distance calls. Looking at the code, probably for easy of use,
we were creating a new slice on *every* Distance calculation.

Use the Points already in the task instead. Here's the result:

benchcmp old.txt new.txt
benchmark                                                   old ns/op
new ns/op       delta
BenchmarkBruteForceOptimize/optimize-short-flight-1/1-4     42654178724
21424710602     -49.77%

4 of 4 new or added lines in 1 file covered. (100.0%)

378 of 438 relevant lines covered (86.3%)

1991015.31 hits per line

Relevant lines Covered
Build:
Build:
438 RELEVANT LINES 378 COVERED LINES
1991015.31 HITS PER LINE
Source Files on pprof
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
57 pprof Improve Task.Distance by not allocating new slices pprof analysis showed the following results: 0.95s 2.13% 3.01% 30.22s 67.86% github.com/ezgliding/goigc.(*Task).Distance 2.54s 5.70% 8.71% 16.31s 36.63% runtime.growslice ... push 10 Aug 2017 09:10PM UTC rochaporto travis-ci pending completion  
55 pprof Improve Task.Distance by not allocating new slices pprof analysis showed the following results: 0.95s 2.13% 3.01% 30.22s 67.86% github.com/ezgliding/goigc.(*Task).Distance 2.54s 5.70% 8.71% 16.31s 36.63% runtime.growslice ... push 10 Aug 2017 09:06PM UTC rochaporto travis-ci pending completion  
See All Builds (154)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc