biocore/empress

Save extra work of cos/sin calls

Ouverte

#225 ouverte le 29 juin 2020

 (0 commentaire) (0 réaction) (0 personne assignée)JavaScript (32 forks)auto 404
good first issueperformancerefactoring

Métriques du dépôt

Stars
 (56 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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

Guide contributeur