adafruit/Adafruit_ILI9341 — pull request #3 by pepijndevos (2014-10-02 17:22:23+00:00)
Title: Speed improvements

I made some performance improvements based on the work by [dominicbeesley](https://forums.adafruit.com/viewtopic.php?f=31&t=60072)

Things I did so far:

* If SPI transactions are supported, don't set the mode again.
* Changed the hwspi conditionals to ifdefs. Might be problematic.
* Use transfer16 when available.

Things I did not do:

* Anything else mentioned in the thread.

```
Arduino (1.5.8) Mega baseline
Screen fill 2416012
Text 267300
Lines 2494464
Horiz/Vert Lines 202864
Rectangles (outline) 133960
Rectangles (filled) 5018708
Circles (filled) 994004
Circles (outline) 1090356
Triangles (outline) 791340
Triangles (filled) 2029760
Rounded rects (outline) 416492
Rounded rects (filled) 5552372

transaction use
Screen fill 2030060
Text 249156
Lines 2322284
Horiz/Vert Lines 171428
Rectangles (outline) 113968
Rectangles (filled) 4216884
Circles (filled) 884060
Circles (outline) 1015056
Triangles (outline) 736736
Triangles (filled) 1770384
Rounded rects (outline) 379808
Rounded rects (filled) 4680788

compile time hwspi
Screen fill 1716432
Text 235480
Lines 2194776
Horiz/Vert Lines 147816
Rectangles (outline) 98960
Rectangles (filled) 3565456
Circles (filled) 802248
Circles (outline) 958944
Triangles (outline) 696268
Triangles (filled) 1576048
Rounded rects (outline) 352524
Rounded rects (filled) 3989248

spiwrite16
Screen fill 1692168
Text 235020
Lines 2191452
Horiz/Vert Lines 145888
Rectangles (outline) 97728
Rectangles (filled) 3514784
Circles (filled) 796864
Circles (outline) 957376
Triangles (outline) 695224
Triangles (filled) 1560488
Rounded rects (outline) 351208
Rounded rects (filled) 3934632
```