If all this feels like a lot of work and extra processing just to save memory, the simple answer is: it is. Optimizations for the sake of memory conservation almost always increase CPU consumption and vice versa.
That's all very well, but who is going to be happy with the trade-off of your code running 2 orders of magnitude slower than the code you are replacing?
Especially as for an application using 10 threads and sharing 1000 data items, your code requires 64MB compared with threads::shared's 21MB.
Optimisation?
In reply to Re^2: Sharing XS object?
by BrowserUk
in thread Sharing XS object?
by menth0l
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |