Skip to content

Make lexing ARM-friendly #21

Open
Open
@duck2

Description

@duck2

The current trie lexer makes use of the fast unaligned 32/64 bit access found in amd64 architectures:

inline enum_pin_type lex_pin_type(const char *in){
	unsigned int len = strlen(in);
	switch(len){
	case 4:
		switch(*((triehash_uu32*)&in[0])){
		case onechar('O', 0, 32) | onechar('P', 8, 32) | onechar('E', 16, 32) | onechar('N', 24, 32):
			return enum_pin_type::OPEN;
[...]
}

This might run slower in other architectures. Add a knob to uxsdcxx to generate "flat" tries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions