![]() ![]() Normally difficult-to-read code was written because it was quicker to write, not because it executes any faster. Deal with it pĬlean code is not necessarily exclusive with fast-executing code. But when you actively, positively, genuinely want it to handle unexpected data in the absolute fastest way it may well get ugly. Even in that arena you need to choose the appropriate level of abstraction. ![]() That said, there are different ways of doing meta-programming, with different levels of insanity and different levels of overhead. IMO, the answers above that suggest it can be fast and easy to maintain are referring to application code where the developer has more control over the data-structures, and isn't using tools like meta-programming. Now application code is slightly different, as that is where "regular" (sane) developers are typically investing much of their collaborative/professional time the goals and expectations of each are (IMO) slightly different. "coding over the cliff of insanity, so you don't have to " In this way, I happily accept library code may be "uglier" than application code, simply becuase it has less (or maybe no) control over the inputs, so needs to achieve some tasks through different mechanisms. That is some ugly, ugly code, but very fast. Here, the best way to make this performant is meta-programming, which (since I'm in. external to the library), with (by design) no mandate over the incoming types. In my OSS existence I do a lot of library work aimed at performance, that is deeply tied to the caller's data-structure (i.e. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |