Re: can i rewrite yyparse() based on ACTION and GOTO tables extracted from XML output?
Akim Demaille <[email protected]> Sat, 6 Nov 2021 09:44:55 +0100
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Levin, > Le 28 oct. 2021 à 08:24, elite liu <[email protected]> a écrit : > > Dear Akim, > > I am writing a utility that convert a table-driven dfa into > condition/if-else form, for example: > [...] I have always wondered if code won't be more efficient than tables. Since compiler and cpu have learned a lot of tricks to make code faster, I wouldn't be surprised to have some speedup. > If above codes are writen in tabled-driven implementation, it should be > more concise. Sure. And compactness is also cache friendliness. So I agree it is very much unclear which approach will beat the other one. On today's machines. Cheers.