Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 113978 Details for
Bug 171580
dev-libs/libmowgli: Request for keywording
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test/Benchmark for dev-utils/libmowgli
mowgli-test.c (text/plain), 1.38 KB, created by
Danny van Dyk (RETIRED)
on 2007-03-21 15:39:20 UTC
(
hide
)
Description:
Test/Benchmark for dev-utils/libmowgli
Filename:
MIME Type:
Creator:
Danny van Dyk (RETIRED)
Created:
2007-03-21 15:39:20 UTC
Size:
1.38 KB
patch
obsolete
>#include <mowgli.h> >#include <glib.h> > >void bench(int iterations) >{ > double start, end; > struct timeval tv; > int i; > mowgli_list_t l = { 0 }; > GList *list = NULL; > > printf("%d iterations:\n", iterations); > > gettimeofday(&tv, NULL); > start = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0; > for (i = 0; i < iterations; i++) > list = g_list_append(list, NULL); > gettimeofday(&tv, NULL); > end = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0; > printf(" GList: %.10f\t", end - start); > > gettimeofday(&tv, NULL); > start = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0; > for (i = 0; i < iterations; i++) > mowgli_node_add(NULL, mowgli_node_create(), &l); > gettimeofday(&tv, NULL); > end = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0; > printf(" Mowgli: %.10f\n", end - start); >} > >int main(int argc, char *argv[]) >{ > mowgli_init(); > > printf("\"GList\" vs mowgli_list_t test.\n"); > printf("GList is in quotes because it's actually a queue, and thus is expected to be O(n).\n"); > printf("Scores are measured in seconds required to finish the job.\n"); > > bench(100); > bench(1000); > bench(10000); > bench(25000); > bench(50000); > bench(100000); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 171580
:
113941
| 113978 |
114021