Add stringencoders 3.3.0, collection of high performance c-string

transformations.

PR:		ports/113664
Submitted by:	Steven Kreuzer <skreuzer at exit2shell.com>
This commit is contained in:
Vanilla I. Shu 2007-06-16 12:51:29 +00:00
parent f4e93f459e
commit 5e1d8860f2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=193664
7 changed files with 317 additions and 0 deletions

View file

@ -2118,6 +2118,7 @@
SUBDIR += stlport
SUBDIR += str
SUBDIR += strace
SUBDIR += stringencoders
SUBDIR += styx
SUBDIR += subclipse
SUBDIR += subversion

View file

@ -0,0 +1,21 @@
# New ports collection makefile for: stringencoders
# Date created: 11 June 2007
# Whom: Steven Kreuzer <skreuzer@exit2shell.com>
#
# $FreeBSD$
#
PORTNAME= stringencoders
PORTVERSION= 3.3.0
CATEGORIES= devel
MASTER_SITES= http://stringencoders.googlecode.com/files/
DISTNAME= ${PORTNAME}-v${PORTVERSION}
MAINTAINER= skreuzer@exit2shell.com
COMMENT= Collection of high performance c-string transformations
HAS_CONFIGURE= yes
USE_LDCONFIG= yes
USE_AUTOTOOLS= libtool:15
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
MD5 (stringencoders-v3.3.0.tar.gz) = 8ba9e6ee3478cb57a26c1cf6ff8c336b
SHA256 (stringencoders-v3.3.0.tar.gz) = af10b06e6306cb1eec8ad0fc70d78319a8fcdfc938142d7b7c427c9869876637
SIZE (stringencoders-v3.3.0.tar.gz) = 314437

View file

@ -0,0 +1,65 @@
--- test/speedtest_ascii.c.orig Wed Jun 6 13:24:30 2007
+++ test/speedtest_ascii.c Thu Jun 14 05:39:13 2007
@@ -244,7 +244,7 @@
}
t1 = clock();
last = t1 -t0;
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
/**
@@ -255,7 +255,7 @@
toupper_copy2(obuf, buf, sizeof(buf));
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
/**
@@ -266,7 +266,7 @@
toupper_copy3(obuf, buf, sizeof(buf));
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
/**
@@ -277,7 +277,7 @@
toupper_copy4(obuf, buf, sizeof(buf));
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
@@ -289,7 +289,7 @@
toupper_copy5(obuf, buf, sizeof(buf));
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
/**
@@ -300,7 +300,7 @@
toupper_copy6(obuf, buf, sizeof(buf));
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
/**
@@ -312,7 +312,7 @@
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
printf("%.1fx\n", last/(t1-t0));

View file

@ -0,0 +1,200 @@
--- test/speedtest_numtoa.c.orig Wed Jun 6 13:24:30 2007
+++ test/speedtest_numtoa.c Thu Jun 14 05:38:14 2007
@@ -26,7 +26,7 @@
sprintf(buf, "%hhu", ju8);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -36,7 +36,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -45,7 +45,7 @@
modp_uitoa10(ju8, buf);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);
@@ -56,7 +56,7 @@
sprintf(buf, "%hu", ju16);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -66,7 +66,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -75,7 +75,7 @@
modp_uitoa10(ju16, buf);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);
@@ -86,7 +86,7 @@
sprintf(buf, "%u", i);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -95,7 +95,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -103,7 +103,7 @@
modp_uitoa10(i, buf);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);
@@ -114,7 +114,7 @@
sprintf(buf, "%hhd", ju8);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -124,7 +124,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -133,7 +133,7 @@
modp_itoa10(j8, buf);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);
@@ -144,7 +144,7 @@
sprintf(buf, "%hd", j16);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -154,7 +154,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -163,7 +163,7 @@
modp_itoa10(j16, buf);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);
@@ -175,7 +175,7 @@
sprintf(buf, "%d", i);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -184,7 +184,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -192,7 +192,7 @@
modp_itoa10(i, buf);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);
@@ -203,7 +203,7 @@
sprintf(buf, "%e", (double)(i));
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -213,7 +213,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -223,7 +223,7 @@
}
t1 = clock();
last = (t1-t0);
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
fflush(stdout);
t0 = clock();
@@ -232,7 +232,7 @@
modp_dtoa(d, buf, 6);
}
t1 = clock();
- printf("%lu\t", (t1-t0));
+ printf("%lu\t", (unsigned long)(t1-t0));
printf("%.1fx\n", last/(t1-t0));
fflush(stdout);

View file

@ -0,0 +1,14 @@
A collection of high performance c-string transformations, frequently 2x faster
than standard implementations.
including
* base64, standard
* base64, web/url safe, with configurable alphabet
* base85 (good for http cookies)
* base16 (hex)
* base2 (ascii binary)
* url escaping
* javascript string escaping
* fast number to string conversion, 4-22x faster than sprintf!
* fast ascii upper/lower case conversion, 2-66x faster than stdlib!

View file

@ -0,0 +1,13 @@
include/modp_ascii.h
include/modp_b16.h
include/modp_b2.h
include/modp_b64.h
include/modp_b64w.h
include/modp_b85.h
include/modp_bjavascript.h
include/modp_burl.h
include/modp_numtoa.h
lib/libmodpbase64.a
lib/libmodpbase64.la
lib/libmodpbase64.so
lib/libmodpbase64.so.0