Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defined wordchar table #202

Closed
wants to merge 2 commits into from
Closed

Conversation

afredd
Copy link
Contributor

@afredd afredd commented Apr 30, 2013

Explicitly define the array wordchar_table[].

  • use unsigned char and not int - minor space saving
  • smaller code footprint (no init_wordchar_table() code)

@forgottenswitch
Copy link

forgottenswitch commented Nov 23, 2016

http://stackoverflow.com/questions/10670213/efficiency-char-array-vs-int-array mentions that char could be slower than int.

@ggreer
Copy link
Owner

ggreer commented Nov 26, 2016

Sorry, but this is harder to understand, more lines of code, and less likely to work across platforms. There's a slight performance improvement since wordchar_table[] is already initialized, but it's not worth the extra complexity and brittleness.

@ggreer ggreer closed this Nov 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants