google / recki-ct Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Recki-CT cannot compile itself.
It should be able to.
Hello @ircmaxell ,
Thanks for your work, I personally learn a lot from this codebase (and your blog :-) ).
I just want to know if you can share your vision/roadmap for recki-ct.
Is it an experimental project or a WIP.
Thanks a lot.
I was testing this project but instead of a performance gain I see a performance degradation... Am I doing something wrong?
php -v
PHP 5.6.2 (cli) (built: Oct 17 2014 09:51:11)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
php -r "phpinfo();" | grep JIT
JITFU
JIT-Fu support => enabled
php examples/01-basic-usage.php
PHP completed in 0.0168 seconds
ReckiCT completed in 0.0326 seconds
PHP 5.6.4
Part of interest in the callstack + arguments.
Jit::parseFile($fileName = false)
Jit::getFunctionAst($name = 'strlen')
$fileName = realpath($fileName);
returns the current working directory.
Since $this->parsedFiles[$fileName]
(with the working path as $fileName
) does not exist, it will enter the condition and attempt to read a file. In this particular case, it'll attempt to read the directory, which does not make sense. Thus, I end up with
file_get_contents(E:\GIT\recki-ct\test): failed to open stream: Permission denied
I tried to modify 01-simple-usage.php to use string
instead of int
like this:
/**
* @param string $n The parameter
*
* @return string The parameter, returned
*/
function test($n)
{
return $n;
}
$func = Jit::jitfu('test');
benchmark($func, "ReckiCT");
function benchmark(callable $func, $label)
{
$start = microtime(true);
for ($i = 0; $i < 1000000; $i++) {
$func('x');
}
$end = microtime(true);
printf("%s completed in %01.4F seconds\n", $label, $end - $start);
}
And got a fatal error:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 947180166 bytes) in ...
Then I tried array
type:
/**
* @param array $n The parameter
*
* @return array $n
*/
function test($n)
{
return [$n];
}
...
function benchmark(callable $func, $label)
{
...
$func([]);
....
}
And got:
Fatal error: Uncaught exception 'LogicException' with message 'Found node without parser rule: Expr_Array' ...
So I wonder which types are supported?
https://github.com/google/recki-ct/blob/master/LICENCE = 404
Thanks for sharing such interesting project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.