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

GEP does useless caching #24

Closed
erkyrath opened this issue Jun 17, 2015 · 0 comments
Closed

GEP does useless caching #24

erkyrath opened this issue Jun 17, 2015 · 0 comments

Comments

@erkyrath
Copy link
Contributor

Glulx Entry Points has a function GEP_TestGestalts which checks all the Glk and Glulx gestalt selectors and caches their results.

This appears to be done correctly -- that is, it's re-checked during IdentifyGlkObject(), which is important. However, it's kind of useless. The @gestalt opcode test is faster than an Inform array lookup. A glk_gestalt() call is slower by one function call but this is really not worth worrying about. (And even if it were, the time saved will usually be outweighed by the cost of caching the 35 values that most games ignore.)

Removing the function and the GEP_GlulxGestaltResults/GEP_GlkGestaltResults arrays would save some bytes and simplify the extension.

I think I've mentioned this before, so I apologize for being tedious about it.

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

No branches or pull requests

1 participant