On 31-Dec-15 09:00, Erik de Castro Lopo wrote:
Brian Willoughby wrote:
What's wrong with something incredible simple, like:
#define FLAC__BYTES_PER_WORD (sizeof(int))
The fact that it actually is not correct. We want to determine
the size in bits of the CPU registers.
Here's what I know:
Cristian Adam wrote:
>
> On Windows x64 sizeof(long) is 4, but sizeof(ptrdiff_t) is 8.
>
> Any reasons for not using sizeof(ptrdiff_t)?
Because of x32 Linux which is the x86_64 registers but with 32
bit pointers. 32 bit pointers means sizeof(ptrdiff_t) is probably
4.
Erik
--
Brian Willoughby wrote:
> What's wrong with something incredible simple, like:
>
> #define FLAC__BYTES_PER_WORD (sizeof(int))
The fact that it actually is not correct. We want to determine
the size in bits of the CPU registers.
Here's what I know:
sizeof(int) sizeof
On Dec 30, 2015, at 3:09 AM, Thomas Zander
wrote:
> On 29 December 2015 at 21:50, lvqcl wrote:
>> So, does it make sense to #define FLAC__BYTES_PER_WORD (in bitreader.c)
>> as 4 for 32-bit and as 8 for 64-bit targets?
>
> Your tests so far
On 29 December 2015 at 21:50, lvqcl wrote:
> So, does it make sense to #define FLAC__BYTES_PER_WORD (in bitreader.c)
> as 4 for 32-bit and as 8 for 64-bit targets?
Your tests so far imply this is a sensible default.
I'd say go ahead. We can always change it if it turns out
I wrote a patch that enables FLAC__BYTES_PER_WORD==8 in
libFLAC/bitreader.c and libFLAC\bitwriter.c.
The tests were done on an Intel Nehalem CPU, and flac was compiled
with CGG 4.9.x.
Average speed increase for FLAC__BYTES_PER_WORD change from 4 to 8:
Decoding speed:
ia32 architecture
On 29 December 2015 at 17:10, lvqcl wrote:
> I wrote a patch that enables FLAC__BYTES_PER_WORD==8 in
> libFLAC/bitreader.c and libFLAC\bitwriter.c.
> The tests were done on an Intel Nehalem CPU, and flac was compiled
> with CGG 4.9.x.
If you want to share the patch, I am
Thomas Zander wrote:
> If you want to share the patch, I am happy to repeat some testing on
> Sandy Bridge and Core2 with clang.
The patch changes many files, libFLAC/bitwriter.c and
test_libFLAC/bitwriter.c among them. So now I wait for the decision
for patches #3 and #4 that I posted