biocore/empress

Save extra work of cos/sin calls

开放

#225 创建于 2020年6月29日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (32 个派生)auto 404
good first issueperformancerefactoring

仓库指标

星标
 (56 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

@wasade pointed this out about this JS code -- there are 8 calls to cos or sin within this block, but we could cut this down to just 4 calls by saving the value of each call for later in the block.

From some more digging, this also impacts this JS code for drawing thick lines, as well as this python code.

贡献者指南