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

ezgliding / goigc / 59 / 1
86%
master: 68%

Build:
Build:
LAST BUILD BRANCH: binder
DEFAULT BRANCH: master
Ran 10 Aug 2017 09:29PM UTC
Files 5
Run time 0s
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

10 Aug 2017 09:26PM UTC coverage: 86.301%. First build
BUILDFLAVOR=goveralls

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%

378 of 438 relevant lines covered (86.3%)

1991015.31 hits per line

Source Files on job 59.1 (BUILDFLAVOR=goveralls)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 59
  • Travis Job 59.1
  • a465b0e5 on github
  • Next Job for BUILDFLAVOR=goveralls on pprofdist (#61.1)
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