Re:Circle: C++ Automation Language
by vlovich123 on Saturday October 16, 2021 @08:10PM
(#28892767)
Imagine you want to intern your printf strings somewhere so that your logs look like logit(“some message providing more details. %s, %d”, someStringArg, someIntArg). Typically you have to serialize the whole thing and store it. However, if you save the compile string into a separate database at compile time and the call site transforms to logit(msgId, someStringArg, someIntArg), then you’ve reduced your logging cost to the cost of serializing the log message which is drastically cheaper, faster and takes less space in whatever log storage system you use. You only pay the formatting cost when you go to display the logs to a person.
[ Parent
| on HN ]
There are no comments on this comment yet.