On Fri, Oct 28, 2016 at 6:54 AM, 'simon place' via golang-nuts <golang-nuts@googlegroups.com> wrote: > however, from looking at it, couldn’t find documentation, that code is > specific to speeding up graphics overlays? maybe? (accumulate)
Yes, speeding up an accumulation step, described at https://medium.com/@raphlinus/inside-the-fastest-font-renderer-in-the-world-75ae5270c445#.qz8jram0o The generated code are SIMD implementations of very simple Go functions. For example, the fixedAccumulateOpSrcSIMD function in the generated https://github.com/golang/image/blob/master/vector/acc_amd64.s file is the SIMD equivalent of the fixedAccumulateOpSrc function in https://github.com/golang/image/blob/master/vector/raster_fixed.go > but it’s confusing me that its using templates, when there seems to only be > one template. There is only one template, instantiated 6 times. There are 2 types of math (fixed point and floating point), and 3 types of composition operator (draw over, draw src, and accumulate to mask). Raph's original C prototype, using intrinsics, is at https://github.com/google/font-rs/blob/master/src/accumulate.c but that does only 1 of those 6: floating point and draw src. IIRC it does assume that the input slice's length is a multiple of 4, unlike the Go code, but the C code is a proof of concept, not a production quality library. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.