JamieMason / JamieMason/peach.js

Memoize

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Memoize already compiled iterators using their toString(). In theory then, something like...

```
$(document.body).click(function () {
$("div").each(function (i) {
if (this.style.color != "blue") {
this.style.color = "blue";
} else {
this.style.color = "";
}
});
});
```

...could benefit from the potential speed improvement of compiled iterators, without any extra effort from developers using the library.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the compiled-iterator implementation and the path that turns iterator functions into executable code. Check how iterator identity is currently handled before evaluating the proposed toString()-based memoization. Done means equivalent compiled iterators can reuse prior work without changing the behavior shown in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.