lwc PPC460ex on-chip memory optimisations

Chris Young chris.young at unsatisfactorysoftware.co.uk
Fri Mar 1 23:43:57 GMT 2013

As alluded to earlier, I've modified libwapcaplet so it is
optimised for the PPC460ex's on-chip memory, under AmigaOS 4.1.

The changes are:
* The lwc_string structures are now allocated from memory pools of
64KB chunks (this is largely because the PPC460's OCM is 64K in size,
so that becomes the first pool)
* The strings themselves are now allocated separately to the
lwc_string structure via malloc (this moves the malloc allocation to
the string, with the structure taken from the pool - so we're
still only doing one malloc per string for minimal performance impact)
* Destructor added to free all used memory and pools

I'm seeing an approx 10% improvement in string interning on the
PPC460ex, and no material change on my PPC440 (with no OCM) in basic
tests.  I'd quite like to get this or something like it merged in to
trunk, as it provides a small improvement to NetSurf on the right
architecture (and the SAM460s are quite popular).

I've pushed these changes to the branch "chris/sam460-ocm" for
testing, benchmarking, criticism, etc.


More information about the netsurf-dev mailing list