Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Parrot virtual machine, Pint, Plumhead, phc compiler and Drupal

  1. Home

By Khalid on 2007/05/25 - 11:23, last updated 2022/11/17 - 16:06

As we all know, PHP is tied to the Zend Engine, which is the heart of PHP. Zend has other products that interface with the Zend Engine, such as the Zend optimizer.

However, over the years there has been efforts to offer community led alternatives to those parts of PHP's underlying layers. For example, APC is a free PHP op-code cache /accelerators that is community driven, and also eAccelerator is another.

Parrot, Pint, Plumhead and phc

Another possible area is whether PHP will use a common scripting engine. One candidate is Parrot, which aims to be a generic virtual machine engine for languages such as Perl.

There was an effort back in 2003 by Alan Knowles to make PHP use Parrot. Although this effort is now abandoned, there is another effort, Plumhead, that promises to do the same thing.

There is also a very interesting project called phc, which is a PHP compiler. It aims at compiling PHP into native machine code, and hence the need for op-code caches and all those tricks vanish.

What does this mean for Drupal?

Well, what does all this mean for Drupal?

If/when Plumhead becomes the underlying mechanism of PHP, replacing Zend, there are some interesting things that could happen. Think about all the common things that would be made to plug into Parrot, for example debuggers and profilers that work for all Parrot based languages. Even parts of Drupal can be rewritten in PIR (Parrot Intermediate Representation) or even Pasm (the Parrot Assembler) for better performance if that is beneficial. Or Drupal can be pre-compiled into PBC (Parrot Bytecode) directly.

Moreover, currently, there is room for further optimization in Drupal's code when there is no op-code cache. As PHP is read, parsed, and tokenized CPU and memory are consumed more and more. This is specially true for shared hosts where op-code caches are not common. When running on a VPS or a dedicated host, op-code caches make these bottlenecks irrelevant.

This can be tuned even further by compiling Drupal into native machine code using phc, and hence it would run as fast as compiled C code! That would be a real performance boost, and the bottleneck would be the database only.

Resources

  • Parrot: a virtual machine for scripting languages. See the examples.
  • Pint: a PHP Parrot implementation by Alan Knowles. Now abandoned.
  • Plumhead:a PHP Parrot implementation project underway.
  • phc: A PHP compiler. Does not yet compile PHP, but has some very interesting spinoff projects.
  • Roadsend PHP Compiler, now open source.
  • Quotes from a 2004 interview with Rasmus where he says that Parrot may replace Zend.
Contents: 
Drupal
  • Add comment

Comments

Gábor Hojtsy (not verified)

get those names right

Fri, 2007/05/25 - 17:03

Well, as Alan's blog post clearly shows, Pint was a project of "Sterling and Thies", that is Sterling Hughes and Thies C. Arntzen. Alan Knowles worked on PHPSharp which was a glue between .NET and PHP.

  • reply

Khalid

Thanks

Sat, 2007/05/26 - 17:45

Thanks for the correction Goba.Regardless, Pint is an abandoned effort. It would have been nice to have a VM for PHP early on.Here is to hoping that Plumhead matures and does not meat the same fate as Pint. More importantly, phc is also very promising.-- Khalid Baheyeldin

  • reply

Bernhard Schmalhofer (not verified)

Plumhead and PHC

Sat, 2008/05/31 - 05:57

I'm the guy toying with Plumhead, that is PHP on Parrot. It's nice to get some encouragement!
In the last months I haven't done much work on Plumhead, but I plan on picking it up again in July and August.

One of my goals of Plumhead is to compare different parsing strategies for PHP. So one variant of Plumhead is actually based on PHC. I take the XML-output from PHC and transform it with XSLT to an abstract syntax tree that Parrot understands.

  • reply

Bernhard Schmalhofer (not verified)

Link to Plumhead

Sat, 2008/05/31 - 06:03

The Plumhead-Wiki is now at Plumhead

  • reply

Anonymous (not verified)

Any comments on Caucho's

Fri, 2008/09/12 - 23:49

Any comments on Caucho's Quercus? I run Drupal this way.

http://wiki.caucho.com/Quercus:_Drupal

  • reply

Khalid

Caucho Quercus

Sat, 2008/09/13 - 00:30

I blogged about these some time ago here: Life imitates humor: Drupal in Java and here: Yes, it is true, Java can run Drupal faster.

  • reply

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.