biocore/empress

Save extra work of cos/sin calls

Aperta

#225 aperta il 29 giu 2020

 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (32 fork)auto 404
good first issueperformancerefactoring

Metriche repository

Star
 (56 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

@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.

Guida contributor