ObjFW  Check-in [28170f5f65]

Overview
Comment:Greatly improve OFObject's memory handling and performance.

A linked-list is put before each memory chunk allocated instead of
having an array of all memory chunks. This means only one malloc now
instead of one malloc and one realloc. This also means that when
checking reallocs and frees, it's no longer necessary to iterate through
all memory chunks, as the linked list also contains the owner, meaning
realloc and free are no longer O(n), but O(1) now.

As allocating bigger chunks seems to be a little bit slower than smaller
chunks, it seems that this is slightly slower in benchmarks if only very small
chunks are allocated. However, measuring real world usage, it's a lot faster.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 28170f5f658db22d78a3a3c69421419c0c13c765b7ab40a13cb5f8f3b03da294
User & Date: js on 2012-03-15 11:29:24
Other Links: manifest | tags
Context
2012-03-16
14:01
One malloc less when allocating a string. check-in: 3005748a9d user: js tags: trunk
2012-03-15
11:29
Greatly improve OFObject's memory handling and performance. check-in: 28170f5f65 user: js tags: trunk
2012-03-14
15:47
gcc is stupid... check-in: 8cf554bd32 user: js tags: trunk
Changes