orcc/orcc — pull request #116 by robstewart57 (2014-07-21 10:49:56+00:00)
Title: Replace fseek+fwrite with putc. fixes orcc/orcc#115

The `Writer_write(..)` native procedure uses fseek, which is
unnecessary and is demonstrably costly to runtimes of programs that
use the procedure frequently, as shown in
https://github.com/orcc/orcc/issues/115

This commit removes fseek, and also replaces fwrite with putc. putc
is 2.2x faster for a large number of bytes streamed into a file, one
byte at a time which is what `Writer_write(..)` is doing. This has
been benchmarked in
https://github.com/robstewart57/fwrite-fputc-benchmark