Skip to content

Test application to compare "naïve" box allocation (with a stack copy) and a maybe-uninit initialization approach

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mexus/box-allocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

box-large-array

A test application to compare "naïve" box allocation (with a stack copy) and a maybe-uninit approach.

% ulimit -s 1048600

% cargo run --release -- --naive
sum = 136905762075
Calculated in 1.098912998s

% cargo run --release
...
sum = 136905762075
Calculated in 612.201882ms

% cargo run --release -- --not-that-naive
...
sum = 136905762075
Calculated in 710.362643ms

Criterion comparison (on 2 * 1024 * 1024 = 2097152 elements):

init/naïve             time:   [163.90 us 164.06 us 164.25 us]
init/maybe-uninit       time:   [60.739 us 60.748 us 60.757 us]
init/not-that-naïve    time:   [105.66 us 106.21 us 106.63 us]

About

Test application to compare "naïve" box allocation (with a stack copy) and a maybe-uninit initialization approach

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages