Skip to content
Snippets Groups Projects
  1. Jul 05, 2017
  2. Jul 03, 2017
  3. Jul 02, 2017
  4. Jun 15, 2017
  5. Jun 11, 2017
  6. Jun 10, 2017
    • faiface's avatar
      Merge branch 'dev' · 79c5d201
      faiface authored
      79c5d201
    • faiface's avatar
      one more tiny doc change · e6484064
      faiface authored
      e6484064
    • faiface's avatar
      minor doc changes · 3fcad750
      faiface authored
      3fcad750
    • Michal Štrba's avatar
      Merge pull request #38 from seebs/master · 1545bd7a
      Michal Štrba authored
      more performance tweaks
      1545bd7a
    • Seebs's avatar
      Push: Don't convert pixel.RGBA to pixel.RGBA · 0dc27e40
      Seebs authored
      Because that's expensive, even in the case where the conversion
      is trivial. Use type assertion first. Reduces runtime cost of
      imdraw.Push from ~15.3% to 8.4%, so not-quite-50% of runtime
      cost of pushing points.
      
      If you were setting imd.Color to Color objects that aren't RGBA
      every single point, not much help. But if you set it and then
      draw a bunch of points, this will be a big win.
      0dc27e40
    • Seebs's avatar
      Improve normal calculations · f2ef87f1
      Seebs authored
      Soooo. It turns out that the bunch of smallish (~4-5% of runtime)
      loads associated with Len(), Unit(), Rotated(), and so on... Were
      actually more like 15% or more of computational effort. I first
      figured this out by creating:
      
      	func (u Vec) Normal(v Vec) Vec
      
      which gives you a vector normal to u->v. That consumed a lot
      of CPU time, and was followed by .Unit().Scaled(imd.thickness / 2),
      which consumed a bit more CPU time.
      
      After some poking, and in the interests of avoiding UI cruft,
      the final selection is
      	func (u Vec) Normal() Vec
      
      This returns the vector rotated 90 degrees, which turns out to
      be the most common problem.
      f2ef87f1
    • Seebs's avatar
      Slightly clean up normal calculations · ef6a44fe
      Seebs authored
      We never actually need the "normal" value; it's an extra calculation
      we didn't need, because ijNormal is the same value early on. It's
      totally possible that we could further simplify this; there's a lot
      of time going into the normal computations.
      ef6a44fe
    • Seebs's avatar
      don't call Len() when it can't change · 9a6e6066
      Seebs authored
      updateData()'s loops checking gt.Len() turns out to have been costing
      significant computation, not least because each call then in turn
      called gt.vs.Stride().
      9a6e6066
    • faiface's avatar
      switch back to OpenGL 3.3 (OS X issues) · 7ebbf7e9
      faiface authored
      7ebbf7e9
  7. Jun 09, 2017
Loading