Re:PyPy is faster than C, again: string formatting
by onedognight on Tuesday August 02, 2011 @05:11PM
(#2838715)
This is fine, except you can't even return x from this function, a more fair comparison might be:
There is a standard (C99) way to do this: asprintf(3).
[ Parent
| on HN ]
Re:PyPy is faster than C, again: string formatting
by tedunangst on Tuesday August 02, 2011 @05:53PM
(#2838860)
There is no asprintf function in my copy of the C99 standard.
Re:PyPy is faster than C, again: string formatting
by onedognight on Tuesday August 02, 2011 @06:47PM
(#2839016)
Sorry, you are correct; I mis-read the man page. It is however in at least glibc and Darwin/FreeBSD's libc.
Re:PyPy is faster than C, again: string formatting
by supersillyus on Tuesday August 02, 2011 @06:34PM
(#2838979)
asprintf is a GNU extension, I believe.