Live data from Hacker News

PHP 8 to Add a JIT

blog.krakjoe.ninja

121–130 of 190 posts

Re: PHP 8 to Add a JIT

#122
Need some love here for AOLServer and TCL. Got "Philip & Alex's Guide to Web Publishing" and within two weeks had a major Mutual Fund company up on the web. The CICS interface was a little wonky, but it worked and worked well.

I do things now with Wordpress, since that grew and was maintained past AOL server. I always look forward to improvements in PHP, the last few releases have made huge strides in page load times

Re: PHP 8 to Add a JIT

#123

My feelings about PHP are stuck in what I remember from 2004. If I’m starting a new backend web project in 2019, should I be considering PHP over Ruby, Python, or TypeScript? Why or why not? I’m curious to hear from anyone who’s used it professionally in the last couple years.

For majority of backend web project, in 2019, there should be nearly no technical advantage re: one language over another among all the popular ones. (i.e. the ones you listed: PHP, Ruby, Python. I would argue to use pure nodejs over Typescript though. Most people underestimate the dev flow speed it gives you to not to have a compile/transpile step. Refresh and rerun is part of what made PHP so popular years ago.)

In short, use whatever you're comfortable with. If you're super proficient with PHP, keep using it. If Python is that language for you, use Python.

Re: PHP 8 to Add a JIT

#124
post #32

Earlier quoted context omitted.

Seriously? On the spectrum of things worth ad blocking, this would never even hit my radar.

I use uBlock Origin and its :style() feature to remove and modify parts of websites that I don't like. I don't block user comments on PHP doc pages out of spite, I do it because they are very long, making it harder to scroll vertically on the actual documentation.

How does comments at the bottom make scrolling harder?

Re: PHP 8 to Add a JIT

#125

My feelings about PHP are stuck in what I remember from 2004. If I’m starting a new backend web project in 2019, should I be considering PHP over Ruby, Python, or TypeScript? Why or why not? I’m curious to hear from anyone who’s used it professionally in the last couple years.

I use Symfony 4 and like it. Clear config organisation, class based controller with logic and route embedded together. Twig the templating engine is nice and doctrine is a very powerful ORM.

Re: PHP 8 to Add a JIT

#126

My feelings about PHP are stuck in what I remember from 2004. If I’m starting a new backend web project in 2019, should I be considering PHP over Ruby, Python, or TypeScript? Why or why not? I’m curious to hear from anyone who’s used it professionally in the last couple years.

I still use PHP a lot.

PHP's problems are largely user driven.

What drove you away in 2004 is likely still there.

The community is still full of people who have no idea.

Laravel is still king.

Noun driven OO is still perceived as a good idea.

But on the flip side, the language has some nice features now and performance got a big boost too.

Still a couple of things missing but it's getting there.

Re: PHP 8 to Add a JIT

#127
post #26

Earlier quoted context omitted.

That's probably too low-level. Usually an AST is needed that is void of all syntactic sugar, yet can express the required data flows and dependencies so the trivial substitutions/replacements/caching and refactorings can be done at this level. Lower level bytecode lacks these higher level references (it usually has a lot of indices that index into raw lookup tables, but no real symbols that refer to results of comput…

PHP has had an AST for years now.

Of course, but the opcode is lower level than that. And that was what the parent comment mentioned.

Re: PHP 8 to Add a JIT

#128
post #90

Earlier quoted context omitted.

Perhaps not better, but there certainly have been worse. As for the comments. Yes. But at least they're there, and quite often helpful. Plenty of times I've read other docs where I wished they had commenting but alas didn't.

The comments are only needed because the documentation is often wrong or confused. And, of course, usually most of the comments are wrong too. Other languages don't need comments because they at least aim to have documentation that's correct.

I don't see it that way. The comments are there to prevent others from re-inventing the wheel, to share insights, etc. Yes, sometimes that also highlights a "bug" or some other "flaw" but that's the rare exception.

Maybe it would help if you listed some links to language docs that you feel the rest should use as benchmarks?

Re: PHP 8 to Add a JIT

#129
post #118

This is the RFC with more technical details https://wiki.php.net/rfc/jit . I believe their plan is to emit low-level code directly via DynAsm, without their own intermediate representation. This kind of approach has been tried again and again and again and every project doing this either not got the results they wanted and given up or has had to go back and add a proper intermediate representation. Examples include R…

> key optimisations such as scalar replacement of aggregates Can u give an example or link to a relevant article. Context: my area is more of high-level program (e.g. shape) analysis

Scalar replacement of aggregates means replacing an object allocated on the heap (for example, Point p = new Point) by local variables corresponding to its fields (double x, double y)

Removing the object allocation saves time and puts less pressure on the GC. Replacing the instance variables with local variables may also allow the compiler to optimize some things that it would not have attempted to optimize before. For example, storing them on machine registers.

Post reply on HN