Skip to content

u/yuriizee

In this archive from Jul 2026 to Dec 2026

4
posts
25
comments
1
media
32
score
7 saved before deletion

Top posts

Compiling PHP DTOs: from reflection to 4.5M hydrations per second (PHP 8.4)

Wrote up how I moved a PHP DTO hydration library from reflection-based instantiation to compiled, per-class factory closures - reflection overhead disappears, plain properties become inline array reads, and the generated code gets cached so a warmed FPM worker pays neither reflection nor eval(). Wen...

0 points11 comments
Open on Reddit

Top comments

Run any AI coding agent in the project root—Claude Code, Gemini CLI, Codex, or any other.

Start by preparing a project specification using Markdown files (md). Document what the project is, its architecture, coding conventions, testing strategy, code style, and any other important project-specific rules.

That alone is usually enough to make a significant difference in how well the AI understands your project's context.

From there, you can start creating custom skills or workflows. For example, when implementing a new feature, the agent could automatically scaffold the entire CRUD structure, including controllers, models, migrations, services, factories, tests, and any other project-specific boilerplate.

2 points

To be precise: OPcache/JIT are both explicitly enabled in the benchmark's Docker image (opcache.enable_cli=1, opcache.jit=tracing) — this isn't a "without OPcache" number. And spatie/laravel-data's structure discovery is itself memoized in-process after the first call (CachedDataConfig), so reflection isn't re-run per hydration either. The gap comes from what runs after structure is known: laravel-data dispatches each ::from() through a ~7-step generic pipe pipeline (map/cast/validate/etc.) that re-walks the property list every call. OPcache/JIT speed up bytecode execution, not that per-call dispatch overhead. SDO compiles the whole thing into one specialized closure per class at build time, so there's no pipeline left to run.

1 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.