Chris Marshall
2013-12-19 13:36:53 UTC
There has been some interesting development of modules for
runtime compilation of C routines for/from perl via the TinyCC
compiler:
http://search.cpan.org/perldoc?Alien::TinyCC
http://search.cpan.org/perldoc?C::TinyCompiler
http://search.cpan.org/perldoc?C::TCC
http://search.cpan.org/perldoc?XS::TCC
The tcc compiler supports code generation for both x86
(32bit and 64bit), and ARM platforms and is an order of
magnitude faster than gcc: small routines can compile
in msec!
This JIT compiling capability could enable the PDL3
build process to be streamlined by compiling only a
limited number of generic versions of the various code
loops by default. Say a version that casts values to
double, processes, and then converts the result back.
That would reduce the size of the static code base and
build time.
Then, the code could be generated at runtime for any
non-generic routines. This also leads to the possibility
of runtime optimization strategies which could lead to
improved cache and memory bandwidth usage.
The sky's the limit! :-)
--Chris
runtime compilation of C routines for/from perl via the TinyCC
compiler:
http://search.cpan.org/perldoc?Alien::TinyCC
http://search.cpan.org/perldoc?C::TinyCompiler
http://search.cpan.org/perldoc?C::TCC
http://search.cpan.org/perldoc?XS::TCC
The tcc compiler supports code generation for both x86
(32bit and 64bit), and ARM platforms and is an order of
magnitude faster than gcc: small routines can compile
in msec!
This JIT compiling capability could enable the PDL3
build process to be streamlined by compiling only a
limited number of generic versions of the various code
loops by default. Say a version that casts values to
double, processes, and then converts the result back.
That would reduce the size of the static code base and
build time.
Then, the code could be generated at runtime for any
non-generic routines. This also leads to the possibility
of runtime optimization strategies which could lead to
improved cache and memory bandwidth usage.
The sky's the limit! :-)
--Chris