Skip to content

Instantly share code, notes, and snippets.

Bill Piel bpiel

Block or report user

Report or block bpiel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Obvious.md

http://www.paulgraham.com/thist.html

That standard religion I just gave you about "stop&copy only pays for the good stuff, but in mark&sweep you have to pay for the garbage, as well"? It's not true. We all believed it for decades. But Norman Ramsey at harvard has cleverly shown that you can implement mark&sweep with exactly the same asymptotic costs as stop&copy. This is good news especially for tight-memory systems with homogenous heap data. Norman's observation is really obvious and simple; hardly an impressive result when you see it. Except, uh, that it eluded everyone else for decades. And not because people didn't care; GC has received a lot of attention from researchers. There's a lesson there.

@bpiel
bpiel / LazyLoader.php
Created Jan 3, 2012
simple general PHP lazy loader
View LazyLoader.php
<?php
class LazyLoader{
private $providerOrValue;
private $evaluated = false;
public function __construct($providerOrValue) {
$this->providerOrValue = $providerOrValue;
}
You can’t perform that action at this time.