• Rusty Russell's avatar
    tal: add benchmark based on Samba4's talloc usage. · 5e0d0dcb
    Rusty Russell authored
    This is based on a very simple dump of S4's talloc tree, which we try
    to duplicate using tal.  The benchmarks are simply to allocate all the
    nodes, free all the nodes individually, and a top-level free.
    
    Size results (32-bit x86):
    	$ ./samba-allocs talloc.dump --talloc-size
    	Read 25998 nodes
    	Virtual size = 10469376, RSS = 4759552
    	$ ./samba-allocs talloc.dump --tal-size
    	Read 25998 nodes
    	Virtual size = 9629696, RSS = 3948544
    
    Speed results:
    	$ ./samba-allocs talloc.dump
    	Read 25998 nodes
    	Malloc time:             1912082ns
    	Free time:               1384892ns
    	Talloc time:             2851531ns
    	talloc_free time:        2133801ns
    	Single talloc_free time: 1696298ns
    	Tal time:                2686952ns
    	Tal_free time:           3316153ns
    	Single tal_free time:    1639407ns
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    5e0d0dcb
talloc.dump 3 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.