<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jacob Santos &#187; just-in-time</title>
	<atom:link href="http://jacobsantos.com/tags/just-in-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://jacobsantos.com</link>
	<description>Rumblings, rants, essays, stories by Jacob Santos about Web Site Development, Persistent Browser-Based Games, personal journal, and Programming.</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:06:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3-aortic-dissection</generator>
		<item>
		<title>In Response to JIT Compilation</title>
		<link>http://jacobsantos.com/2007/writing-projects/in-response-to-jit-compilation/</link>
		<comments>http://jacobsantos.com/2007/writing-projects/in-response-to-jit-compilation/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 04:41:56 +0000</pubDate>
		<dc:creator>santosj</dc:creator>
				<category><![CDATA[Writing Projects]]></category>
		<category><![CDATA[just-in-time]]></category>
		<category><![CDATA[opcode]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.santosj.name/programming/php-related/php-opcode/jit/in-response-to-jit-compilation/</guid>
		<description><![CDATA[<a href="http://jacobsantos.com/2007/writing-projects/in-response-to-jit-compilation/" title="In Response to JIT Compilation"></a>I understand now or at least a little bit more why JIT compilation wouldn&#8217;t be useful. Most pages will take less than a second to execute. Caching, where possible, will also be used to further decrease the time. Opcode Caches &#8230;<p class="read-more"><a href="http://jacobsantos.com/2007/writing-projects/in-response-to-jit-compilation/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://jacobsantos.com/2007/writing-projects/in-response-to-jit-compilation/" title="In Response to JIT Compilation"></a><p>I understand now or at least a little bit more why JIT compilation wouldn&#8217;t be useful.</p>
<p>Most pages will take less than a second to execute. Caching, where possible, will also be used to further decrease the time. Opcode Caches can also be used to keep PHP from compiling the page with each request further decreasing the time it takes. Taken all together most professional web sites wouldn&#8217;t benefit from JIT compilation. Given the delay from converting to machine code, it might actually take longer on the first run.</p>
<p>Would it be quicker to write a C extension for PHP than building a JIT compiler for the Zend Engine? Yes. In the discussion with Frameworks, the solution is to write the slow PHP code in C and write a function to be called in PHP, if available. My argument has always been that I shouldn&#8217;t have to. If it is just as fast using JIT compilation than I shouldn&#8217;t have to touch C code unless I&#8217;m binding some library in C or C++ to be used in PHP. </p>
<p>Yeah, 2x time decrease (<a href="http://www.roadsend.com/home/index.php">Roadsend</a> compiler statistics) doesn&#8217;t sound like much, but I would like to run algorithms that normally take 15 to 30 seconds in half the time. That to me is a huge deal. Now, these algorithms won&#8217;t run in front end pages, of course, but I would like to maintain the code in PHP. The possibility of the algorithm being poor is there, and so is that it would be better writing the code in C/C++.</p>
<p>Well, what I&#8217;m trying to get at, is that with edge cases JIT compilation would make a lot of sense. For those with normal pages, then I concede that you are correct.</p>

<p><strong>Possibly Related Posts:</strong></p>
<ul>
<li><a href="http://jacobsantos.com/2011/writing-projects/what-is-the-obituary-story/">What is the Obituary Story</a></li>
<li><a href="http://jacobsantos.com/2011/writing-projects/hashing-out-obituary-book-details/">Hashing Out Obituary Book Details</a></li>
<li><a href="http://jacobsantos.com/2007/writing-projects/english-iv-untitled-satire/">English IV: Untitled Satire</a></li>
<li><a href="http://jacobsantos.com/2007/writing-projects/opcode-theory-userland-multitasking-introduction/">Userland Multitasking: Introduction</a></li>
<li><a href="http://jacobsantos.com/2007/writing-projects/php-opcode-series/">PHP Opcode Series</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://jacobsantos.com/2007/writing-projects/in-response-to-jit-compilation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>You&#8217;ll Rue The Day</title>
		<link>http://jacobsantos.com/2007/programming/youll-rue-the-day/</link>
		<comments>http://jacobsantos.com/2007/programming/youll-rue-the-day/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 13:10:56 +0000</pubDate>
		<dc:creator>santosj</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[just-in-time]]></category>
		<category><![CDATA[opcode]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.santosj.name/programming/php-related/php-opcode/jit/youll-rue-the-day/</guid>
		<description><![CDATA[<a href="http://jacobsantos.com/2007/programming/youll-rue-the-day/" title="You&#039;ll Rue The Day"></a>You know, whenever someone tells me I can&#8217;t do something or that something I think is possible is impossible, it makes me try even harder to prove them wrong or in most cases, prove them right. Either way, both sides &#8230;<p class="read-more"><a href="http://jacobsantos.com/2007/programming/youll-rue-the-day/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://jacobsantos.com/2007/programming/youll-rue-the-day/" title="You&#039;ll Rue The Day"></a><p>You know, whenever someone tells me I can&#8217;t do something or that something I think is possible is impossible, it makes me try even harder to prove them wrong or in most cases, prove them right. Either way, both sides comes out great. I say that because it proves nothing to the other side if I prove them wrong, because we both benefited from the experience. I&#8217;m not out to make fun or embarrass anyone. If I turn out to be wrong, then I learn a valuable lesson of one that will be hard to forget and they get further evidence to use for the next guy that challenges them.</p>
<p>Win/Win.</p>
<p>I&#8217;m going to try even harder now that enough people are saying that I&#8217;m not right (which is nicer than saying I&#8217;m wrong) on Just-in-Time compilation benefits for PHP. I really do think the extra seconds saved will great impact what PHP can be used for in the future. Judging from a working PHP 4 compiler, it cuts the time in half. Let us say for a moment that you have to process 100 datasets that takes .15 seconds each iteration. That is <strong>15 seconds</strong>. If you compile it and it only takes .075 seconds, then well, it would only take 7.5 seconds. It is a poor example, but the point I&#8217;m trying to make is if you cut the time, even by a fraction, it can save a lot within a loop.</p>
<p>Yeah, sure it isn&#8217;t going to be a huge deal for front end sites because they won&#8217;t have anything that within a loop that takes that long. Even if they had a loop, they would use caching so that users wouldn&#8217;t notice the speed decrease. If you are doing gaming, math intensive, or heavy processing, it can get ugly very fast and limit you quickly on what you can afford to do time and processing on shared hosts.</p>
<p>The only way to know for sure whether or not JIT will benefit users, is to have a working and optimized solution for which testing can occur. My ultimate goal and I hope by next year I&#8217;ll have a working version that can be tested. Along the way, I have other side quests I need to complete before I can get from point &#8216;A&#8217;, which is not having JIT implementation, to point &#8216;B&#8217;, where I have a working implementation.</p>
<p>Not that I care whether or not it speeds PHP up, it would be nice. By this time next year I would know a lot more about Python than I do now and PHP JIT would be less important. My motivation is more compiler theory and always wanting to do something like this. The wealth of knowledge within the Zend and PHP engines is massive and anyone would learn a great deal tweaking and lurking around within them.</p>
<p>So, something next year, I want to either prove I&#8217;m right (hopefully that will be the case) or I&#8217;ll just prove what everyone else is saying and slowly bow my head momentarily in shame.</p>

<p><strong>Possibly Related Posts:</strong></p>
<ul>
<li><a href="http://jacobsantos.com/2012/programming/game-engine-development-and-open-source/">Game Engine Development and Open Source</a></li>
<li><a href="http://jacobsantos.com/2011/programming/plans-for-base-cms/">Plans for Base CMS</a></li>
<li><a href="http://jacobsantos.com/2011/programming/project-plans/">Project Plans</a></li>
<li><a href="http://jacobsantos.com/2011/programming/calibre-improvements-part-2/">Calibre Improvements Part 2</a></li>
<li><a href="http://jacobsantos.com/2011/programming/usability-testing-software-development/">Usability Testing Software Development</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://jacobsantos.com/2007/programming/youll-rue-the-day/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

