Posts

André Ménard

Image
André Ménard (14 February 1907 [1] in Blois, France – 4 November 1988 in Paris, France) [2] was a Governor General in the French colonial empire in the 20th century. Significant events During his reign, the coup d'État de Yanaon happened on 13 June 1954. In the aftermath, he recalled the Administrator of Yanam (Administrateur de Yanaon), George Sala, to Pondicherry. Titles Government offices Preceded by Robert Charles Henri Kuter Governor of New Hebrides 1947–1949 Succeeded by Pierre Amédée Joseph Émile Jean Preceded by Charles Chambon Governor General of Pondichéry 31 July 1950–October 1954 Succeeded by Georges Escargueil References ^ [1] ^ https://www.geni.com/people/Andr%C3%A9-M%C3%A9nard/359348569010003040 Book of the French Military This biographical article related to the French military is a stub. You can help Wikipedia by expanding it. v t e This page is only for reference, If you need detailed infor...

Will printf still have a cost even if I redirect output to /dev/null?

Image
Clash Royale CLAN TAG #URR8PPP 52 6 We have a daemon that contains a lot of print messages. Since we are working on an embedded device with a weak CPU and other constraint hardware, we want to minimize any kinds of costs (IO, CPU, etc..) of printf messages in our final version. (Users don't have a console) My teammate and I have a disagreement. He thinks we can just redirect everything to /dev/null. It won't cost any IO so affections will be minimal. But I think it will still cost CPU and we better define a macro for printf so we can rewrite "printf" (maybe just return). So I need some opinions about who is right. Will Linux be smart enough to optimize printf? I really doubt it. c linux performance embedded dev-null share | improve this question edited Jan 16 at 13:55 iBug 20.5k 6 38 64 asked Jan 15 at 9:40 Michael Peng Michael Peng 438 3 11 18 Beware side effects: printf("%d", x=a+b); If...