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

JuliaIO / VideoIO.jl / 1004 / 6
34%
master: 34%

Build:
DEFAULT BRANCH: master
Ran 03 Aug 2020 01:44AM UTC
Files 105
Run time 13s
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

03 Aug 2020 01:34AM UTC coverage: 21.752% (-12.4%) from 34.116%
1004.6

push

travis-ci

web-flow
Increase efficiency of accessing members of struct pointers (#250)

The current code to access a member of a struct pointer uses a package function,
`fieldposition`, that has identical functionality to a function provided in
base, `fieldindex`. While this latter function is not exported, it is documented
and will hopefully remain a part of Julia's API. I imagine that the base
function is more performant than the implementation in `fieldposition`, which
compares each field name to the target field name in order to find the position
of a field. As such, I have replaced calls to `fieldposition` with calls to
`Base.fieldindex`, and deleted the function `fieldposition`.

Additionally, when setting a member of a struct pointer, the current
implementation calculates the pointer position, wraps it in a julia array with
`unsafe_wrap`, and then sets the first element of that array to the desired
value. The same result is achieved, perhaps more simply, by using
`unsafe_store!` and not using an intermediate array. I have therefore replaced
the call to `unsafe_wrap` and subsequent code with `unsafe_store!`.

While I do not know if the existing code causes a measurable decrease in
performance, using the base functions reduces the amount of code, and most
likely makes it faster.

499 of 2294 relevant lines covered (21.75%)

36428.69 hits per line

Source Files on job 1004.6
  • Tree
  • List 0
  • Changed 72
  • Source Changed 2
  • Coverage Changed 72
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 123
  • Travis Job 1004.6
  • b3dab397 on github
  • Prev Job for on master (#1002.3)
  • Next Job for on master (#1006.4)
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