diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-04-14 14:10:12 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-01 00:18:44 +0200 |
| commit | 12ade83c58720c9e0c18789f5ea6078a9eec1505 (patch) | |
| tree | 86ab3d397e0be4e56fb0872194ed41538b38950a /Makefile | |
| parent | aa4bd0297606ed5c6803a8149bff0a38d8a89827 (diff) | |
| download | sparse-dev-12ade83c58720c9e0c18789f5ea6078a9eec1505.tar.gz | |
ptrmap: core implementation
Sparse currently has a memory efficient implementation for lists
of pointers to some objects.
These are used for 2 different purposes:
- either for a simple set of objects
- either as a sequence (ordered) of objects.
There is also another similar need:
- a map of object (aka: dictionnary, table, ...)
where the only needed operations are:
- add a new element (with it's key)
- lookup an element via it's key
- replace the element corresponding to a key
The implementation done in this patch is a very simple one
based on list of blocks of key-value pairs.
The idea being to later switch to a dynamic structure using
a hash-table as soon as the number of element reach some threshold.
However, these hash-table are only needed for some huge input files
(the current implementation is no worse than walking through
the ptrlists).
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -54,6 +54,7 @@ LIB_OBJS += optimize.o LIB_OBJS += parse.o LIB_OBJS += pre-process.o LIB_OBJS += ptrlist.o +LIB_OBJS += ptrmap.o LIB_OBJS += scope.o LIB_OBJS += show-parse.o LIB_OBJS += simplify.o |
