devkitPro / wut

Let's try to make a Wii U Toolchain / SDK for creating rpx/rpl.
zlib License
236 stars 52 forks source link

wutdevoptab: Only allocate a new buffer if the given buffer is not aligned properly #159

Closed Maschell closed 3 years ago

Maschell commented 3 years ago

TODO: Same could be done for the other function (e.g. write).

Edit: Added implementation for write

Maschell commented 3 years ago

I made some tests and it seems any buffer >=128 KiB will have the best performance.

Writing 100 MiB to the sd card and reading it back using the wut devoptab

1024 KiB buffer
write: ~10 sec
read: ~4 sec

512 KiB buffer
write: ~12 sec
read: ~5 sec

256 KiB buffer
write: ~9 sec
read: ~5 sec

128 KiB buffer
write: ~9 sec
read: ~6 sec

64 KiB buffer
write: ~15 sec
read: ~7 sec

32 KiB buffer
write: ~23 sec
read: ~10 sec

16 KiB buffer
write: ~38 sec
read: ~15 sec

8 KiB buffer
write: ~60 sec
read: ~25 sec

The actual times might not be totally acurrate and vary from run to run, but I think you can clearly see the drop between 128KiB and 64 KiB