On Jun 30, 12:08*pm, tombrog...@googlemail.com wrote:
Personally I'd try to push back on the "identical output" requirement,
satisfying myself instead with a comprehensive sets of tests for the
"compress and then uncompress" cycle. I realise that may be futile in
some situations, but it may be worth pointing out that if the C++ zlib
code is ever patched that may well change the output in a harmless
manner too.
- Show quoted text -
Cheers Jon, I'll do that.
You don't know any way to get maximum performance do you?
Find a bottleneck, squish it. Lather, rinse repeat :)
The exact details of squishing the bottleneck depend on the kind of
bottleneck, but basically profiling is your friend. Don't expect a
profiler to necessarily give you accurate results - the various
techniques used by different profilers always skew results, but you
can still use them a lot to help. (Basically you need to make sure
you've got a benchmark which runs in release mode, not under a
profiler, to see the *actual* improvements gained by making changes
suggested by the profiler.)
I'm having to iterate through many structures (up to 1 million),
compressing them one at a time, with a source data size ranging from a
few kbytes to a meg.
Do you think threading would help? (it will run on multi processor
machines).
Threading should help in that case, if you've got a naturally parallel
system - if you can compress two data sources independently, without
caring about which ends up being written first, for instance. If it's
not naturally parallel it may be harder, but still feasible.
If you're not close to release and don't mind using beta software,
Parallel Extensions makes life a lot simpler in my experience.
Jon