Avoiding trigonometry for the perpendicular computation might help performance (e.g. -y, x in this case).
I replied:
There are 5 occurrences of normalize().rotate( Math.PI / 2 ), I'm also seeing many other opportunities for performance improvements by eliminating allocations.
From https://github.com/phetsims/charges-and-fields/issues/171 @jonathanolson said:
I replied: