r/PHP•
jgmdev

Up to 10x LessRam now with 3x-4x better performance.

I started implementing the PHP library as a C extension for the fun, and to see what could be achieved using the same algorithm. The results are looking good so far: https://github.com/jgmdev/lessram/tree/master/ext some work is needed to get this moving but the base should be in place and benchmarks are looking good!

Posted Jul 15, 2019, 2:19 AM UTC

412
xisonc•

It seems we've come full circle.

6
moeskimoeski•

10x you say?

4
Irythros•

Those are some pretty huge savings if true. 500mb down to 32mb for just double the execution time? Very nice.

2
2012-09-04•

Man!! You should be on the php-internals team with this great code! [completely serious!]

2
jgmdevOP•

PHP would be full of stack overflows and other bugs because of me! Yay! Anyways, don't worry, I will stop posting non sense.

1
bilzen•

Can you also add Judy and Ds to the benchmark?

1
jgmdevOP•

I added Ds\Vector and Ds\Map, but Judy hasn't been ported to PHP 7 so I discarded it, also the Judy C library is huge.

2
_asic•

That's what PHP started as so you kind of just reinvented the wheel.

-3
jgmdevOP•

Can you elaborate more on that? What do you mean?

2
dotted•

PHP was originally meant to just be a templating language for HTML with all the heavy lifting done by C extensions

1†
fab-s•

You missed the context (which is ops fault) . "the php library" referred to this little gem: https://www.reddit.com/r/PHP/comments/cbae56/php_array_implementation_that_consumes_10x_less/

2
SavishSalacious•

After being on twitter if I use this will I be a #10xengineer?

-6