mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-25 07:32:28 +01:00
byuu says: Changelog: - added nall/bit-field.hpp - updated all CPU cores (sans LR35902 due to some complexities) to use BitFields instead of bools - updated as many CPU cores as I could to use BitFields instead of union { struct { uint8_t ... }; }; pairs The speed changes are mostly a wash for this. In some instances, I noticed a ~2-3% speedup (eg SNES emulation), and in others a 2-3% slowdown (eg Famicom emulation.) It's within the margin of error, so it's safe to say it has no impact. This does give us a lot of new useful things, however: - no more manual reconstruction of flag values from lots of left shifts and ORs - no more manual deconstruction of flag values from lots of ANDs - ability to get completely free aliases to flag groups (eg GSU can provide alt2, alt1 and also alt (which is alt2,alt1 combined) - removes the need for the nasty order_lsbN macro hack (eventually will make higan 100% endian independent) - saves us from insane compilers that try and do nasty things with alignment on union-structs - saves us from insane compilers that try to store bit-field bits in reverse order - will allow some really novel new use cases (I'm planning an instant-decode ARM opcode function, for instance.) - reduces code size (we can serialize flag registers in one line instead of one for each flag) However, I probably won't use it for super critical code that's constantly reading out register values (eg PPU MMIO registers.) I think there we would end up with a performance penalty.
81 lines
2.1 KiB
C++
81 lines
2.1 KiB
C++
#pragma once
|
|
|
|
/* nall
|
|
* author: byuu
|
|
* license: ISC
|
|
*
|
|
* nall is a header library that provides both fundamental and useful classes
|
|
* its goals are portability, consistency, minimalism and reusability
|
|
*/
|
|
|
|
//include the most common nall headers with one statement
|
|
//does not include the most obscure components with high cost and low usage
|
|
|
|
#include <nall/platform.hpp>
|
|
|
|
#include <nall/algorithm.hpp>
|
|
#include <nall/any.hpp>
|
|
#include <nall/atoi.hpp>
|
|
#include <nall/bit.hpp>
|
|
#include <nall/bit-field.hpp>
|
|
#include <nall/bit-vector.hpp>
|
|
#include <nall/config.hpp>
|
|
#include <nall/directory.hpp>
|
|
#include <nall/dl.hpp>
|
|
#include <nall/endian.hpp>
|
|
#include <nall/file.hpp>
|
|
#include <nall/filemap.hpp>
|
|
#include <nall/function.hpp>
|
|
#include <nall/hashset.hpp>
|
|
#include <nall/hid.hpp>
|
|
#include <nall/image.hpp>
|
|
#include <nall/inode.hpp>
|
|
#include <nall/interpolation.hpp>
|
|
#include <nall/intrinsics.hpp>
|
|
#include <nall/map.hpp>
|
|
#include <nall/matrix.hpp>
|
|
#include <nall/maybe.hpp>
|
|
#include <nall/memory.hpp>
|
|
#include <nall/path.hpp>
|
|
#include <nall/primitives.hpp>
|
|
#include <nall/property.hpp>
|
|
#include <nall/queue.hpp>
|
|
#include <nall/random.hpp>
|
|
#include <nall/range.hpp>
|
|
#include <nall/run.hpp>
|
|
#include <nall/serializer.hpp>
|
|
#include <nall/set.hpp>
|
|
#include <nall/shared-pointer.hpp>
|
|
#include <nall/sort.hpp>
|
|
#include <nall/stdint.hpp>
|
|
#include <nall/stream.hpp>
|
|
#include <nall/string.hpp>
|
|
#include <nall/thread.hpp>
|
|
#include <nall/traits.hpp>
|
|
#include <nall/unique-pointer.hpp>
|
|
#include <nall/utility.hpp>
|
|
#include <nall/varint.hpp>
|
|
#include <nall/vector.hpp>
|
|
#include <nall/decode/base64.hpp>
|
|
#include <nall/decode/bmp.hpp>
|
|
#include <nall/decode/gzip.hpp>
|
|
#include <nall/decode/inflate.hpp>
|
|
#include <nall/decode/png.hpp>
|
|
#include <nall/decode/url.hpp>
|
|
#include <nall/decode/zip.hpp>
|
|
#include <nall/encode/base64.hpp>
|
|
#include <nall/encode/url.hpp>
|
|
#include <nall/hash/crc16.hpp>
|
|
#include <nall/hash/crc32.hpp>
|
|
#include <nall/hash/crc64.hpp>
|
|
#include <nall/hash/sha256.hpp>
|
|
|
|
#if defined(PLATFORM_WINDOWS)
|
|
#include <nall/windows/registry.hpp>
|
|
#include <nall/windows/utf8.hpp>
|
|
#endif
|
|
|
|
#if defined(API_POSIX)
|
|
#include <nall/serial.hpp>
|
|
#endif
|