Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Man or boy test.

Name: Anonymous 2014-05-25 5:37

http://rosettacode.org/wiki/Man_or_boy_test

So, how does your weapon of choice fare?

Name: Anonymous 2014-05-26 21:51

>>43
Huh. Using massif in valgrind I just found out my implementation uses less memory than guile and also frees it in the most efficient way.

Valgrind --tool=massif heap allocation graph for guile:

MB
3.508^ #
| #
| #
| #
| #
| :@ :::::::#
| @:@:: :@::#
| @:@:: :@::#
| 2.1MB ------- My interpreter's peak '@:@:: :@::#
| :@:@::::@::@:@:: :@::#
| ::::@:::@:@:@:: @::@:@:: :@::#
| ::: @:::@:@:@:: @::@:@:: :@::#
| :::::::::::: @:::@:@:@:: @::@:@:: :@::#
| ::: :::::::: @:::@:@:@:: @::@:@:: :@::#
| :::::::::::::::::::::: :::::::: @:::@:@:@:: @::@:@:: :@::#
| ::: :: : : ::: ::::: :::::::: @:::@:@:@:: @::@:@:: :@::#
| :::@:::::: :: : : ::: ::::: :::::::: @:::@:@:@:: @::@:@:: :@::#
| :::::@:::::: :: : : ::: ::::: :::::::: @:::@:@:@:: @::@:@:: :@::#
| :::::::@:::::: :: : : ::: ::::: :::::::: @:::@:@:@:: @::@:@:: :@::#
| :::::::@:::::: :: : : ::: ::::: :::::::: @:::@:@:@:: @::@:@:: :@::#
0 +----------------------------------------------------------------------->Mi
0 118.5
Number of snapshots: 93
Detailed snapshots: [9, 40, 44, 46, 48, 53, 63, 70, 80, 90, 92 (peak)]


Heap allocation graph for my interpreter:


MB
2.025^ ##
| @# :
| @:@# @@:::::
| ::@:@# @ : : ::::::::::
| ::@:@# @ : : ::::: :: :::::::
| ::::@:@# @ : : ::::: :: ::: :: :::::::::
| @@: ::@:@# @ : : ::::: :: ::: :: :: ::: : :::
| @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::::
| ::@ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: : :
| : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: ::::::
| ::: @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: :::::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: :::::::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::@:
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::@::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::@::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::@::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::@::
| :: : @ : ::@:@# @ : : ::::: :: ::: :: :: ::: : :::@::: :::: ::::::::@::
0 +----------------------------------------------------------------------->Gi
0 40.70

Number of snapshots: 58
Detailed snapshots: [4, 8, 10, 11 (peak), 12, 37, 54]


Mine hits the peak early on at 2MB and decreases steadily after, while guile hits the peak at the end with 3.5MB because it never frees memory (also it has a shitload of memory errors if you run it through valgrind --leak-check=full).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List