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

ezgliding / goigc / 68
86%
master: 68%

Build:
Build:
LAST BUILD BRANCH: binder
DEFAULT BRANCH: master
Ran 10 Aug 2017 10:46PM UTC
Jobs 1
Files 5
Run time 18s
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

pending completion
68

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

Jobs
ID Job ID Ran Files Coverage
1 68.1 (BUILDFLAVOR=goveralls) 10 Aug 2017 10:46PM UTC 0
86.3
Travis Job 68.1
Source Files on build 68
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #68
  • c89fc11f on github
  • Prev Build on pprofdist (#63)
  • Next Build on pprofdist (#69)
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