#include <sys/uio.h> #define str(x) #x #define expand(x) str(x) #define y1 y\n #define y2 expand(y1) expand(y1) #define y4 y2 y2 #define y8 y4 y4 #define y16 y8 y8 #define y32 y16 y16 #define y64 y32 y32 #define y128 y64 y64 #define y256 y128 y128 #define y512 y256 y256 #define y1024 y512 y512 #define y2048 y1024 y1024 //2048 "y\n" s static char __attribute__((aligned(4096))) str[] = y2048; static struct iovec v[] = { {str, 4096}, //adjust number of these to taste {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, {str, 4096}, }; int main(int argc, char** argv) { while(1) { //scatter-gather write (on linux there is basically no way for write to write an odd number of characters, except EOF, so we need not check for partial writes (void)writev(1, v, sizeof(v) / sizeof(*v)); } return 0; }
Is anyone going to take a stab at an enterprise edition?
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:call-template name="y"/> </xsl:template> <xsl:template name="y"> <xsl:text>y </xsl:text> <xsl:call-template name="y"/> </xsl:template> </xsl:stylesheet>