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 合併指標
 (30 天內沒有已合併 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.

貢獻者指南