Atry pointed me to latest release (0.8.7) of his protoc-gen-as3 library. I re-ran my tests to see if it brings any performance improvements – and it does!
Deserialization times are very similar to 0.8.4 which I used previously. I would assume any differences are statistical errors.
| Deserialization | ||||||
| AMF 3 | Protocol Buffers | |||||
| Class: | Small | Medium | Large | Small | Medium | Large |
| Average: (ms) |
445.96 | 962.16 | 1313.68 | 326.26 | 962.00 | 1435.76 |
| Std dev: (ms) |
25.23 | 24.35 | 15.96 | 4.69 | 4.38 | 9.96 |
Serialization times are greatly reduced – PB library is now 3.5 times faster then before for small messages, over 4 times faster for medium and 4.5 times faster for large. It is still slower then AMF3, but I for most use cases the difference is now negligible.
| Serialization | ||||||
| AMF 3 | Protocol Buffers | |||||
| Class: | Small | Medium | Large | Small | Medium | Large |
| Average: (ms) |
137.68 | 214.08 | 317.76 | 237.84 | 563.08 | 814.70 |
| Std dev: (ms) |
13.11 | 14.88 | 16.45 | 11.52 | 15.83 | 17.37 |
Very good news!
Note: Tests were ran on MacBook Pro, 2.26GHz Core 2 Duo, 2GB RAM.

