-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNOTES
More file actions
37 lines (26 loc) · 1.62 KB
/
Copy pathNOTES
File metadata and controls
37 lines (26 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
8-bit chars: utf-8 ftw!
64-bit pointers: memory-mapped huge files ftw!
DONE * replace use of null pointer by boolean return value
BAD IDEA! * use memory-mapped file
- don't allocate any std::string for node content since we reuse the original mapped memory
- that also mean we don't need to "unique" strings, in fact it's better to keep things local
=> not working for read-write situations with incremental behavior, which is the "raison d'etre" of IPG!
-> maybe hybrid solution?
DONE * remove isMemoized
* unify Parse and Traverse
* Traverse coroutine design with no temp vector -> true iterator
* memoize choice alternative when
- necessary lookahead is more than 1 ?
- may pass through another node ? => that respect the restriction not to execute actions on backtracked alternatives, but probably inefficient
* hash table should be as compact as possible
- open adressing
- optimize when we rehash
- keep memos for
- long parsing (maybe simply drop shortest one as soon as we hit a non-empty bucket with linear probing?)
- not sure, if hash table are per symbol type, lengths should be similar.
- result that we may reuse shortly because of backtracking
- one hash table for "skip nodes", one for "real nodes"
* --no-lines does not make any sense: line numbers in generated files are only making sense for the developers of IPG... It should be off by default and be enablable (with --debug flag) only in debug builds.
* inline all non-node definitions
* bring back stand-alone functions: much easier to debug and navigate
* optimize end-of-file check using computed maximum length of some nodes (when not infinite)