[CLJ-1259] Speed up pprint Created: 09/Sep/13 Updated: 03/Oct/14
|Affects Version/s:||Release 1.5|
|Labels:||ft, performance, print|
There are many occurrences of reflection in the pprint implementation.
By eliminating all of them, I ran one benchmark of pprint'ing a Clojure map that resulted in a 300 Kbyte output. After eliminating reflection, the elapsed time to pprint was reduced by 18% (about 14.0 sec down to about 11.5 sec) on a recent model MacBook Pro.
|Comment by Andy Fingerhut [ 09/Sep/13 11:36 PM ]|
Patch clj-1259-1.txt eliminates all occurrences of reflection in pprint, and all files loaded from pprint.clj. It also sets warn-on-reflection to true for those files, in hopes of making it more obvious if a new use of reflection is added there.