This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: Welcome to Nodejitsu _matthewpalmer | |
info: jitsu v0.13.9, node v0.10.21 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in node app.js | |
info: Checking app availability wildfire | |
info: Creating app wildfire | |
error: Error creating wildfire | |
error: socket hang up | |
error: Error running command deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.c | |
// memory | |
// | |
// Created by Richard Buckland on 20/11/12. | |
// | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <float.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.c | |
// memory | |
// | |
// Created by Richard Buckland on 20/11/12. | |
// | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <float.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the index in the array of the header | |
static int indexOfHeader(free_header_t *header) { | |
int index = (int) ((void *)header - (void *)memory); | |
return index; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-f | |
Deallocating memory at 0x7fe751801e10 | |
Our index is 3072 | |
Start header is 0 | |
0x7fe751801200 index: 0 size: 2048 next: 2048 prev: 4032 magic: deadbeef | |
Entering the loop | |
Finished the loop | |
The first header after 0x7fe751801e00 index: 3072 size: 256 next: 3840 prev: 3968 magic: deadbeef | |
is 0x7fe751801200 index: 0 size: 2048 next: 2048 prev: 4032 magic: deadbeef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sort A | |
``` | |
Testing: ./sortA | |
Input size: 10 | |
R: 0.00 seconds | |
A: 0.00 seconds | |
D: 0.00 seconds | |
Input size: 20 | |
R: 0.00 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
$start = 10; | |
$end = 100000; | |
$alg = "./sortA"; | |
$tmp = "tmp1"; | |
@types = ("R", "A", "D"); | |
$start = 10; | |
print "Testing: $alg "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graph | |
http://i.imgur.com/uxBzv0a.png | |
# Sort A | |
We ran our standard tests of input data from 1000 to 100,000 in size, with intervals of 1000. This resulted in the above graph. | |
The average (random) case is roughly polynomial, and it performs nearly as badly on descending data. Interestingly, the algorithm performs very well on ascending data. With these observations, we can narrow the algorithm down to one of the following: | |
- oblivious bubble sort | |
- Vanilla Insertion sort | |
- Insertion sort with binary search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Oblivious Bubble sort | |
- average case: quadratic | |
- unstable | |
- best case performance on sorted data O(N) | |
- worst case performance on reverse sorted data O(N^2) | |
# Vanilla Insertion sort | |
- average case: quadratic | |
- O(N) best case for sorted data | |
- worst case reverse order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sort B | |
Input: | |
``` | |
wagner % cat stableCheck | |
5 one | |
7 two | |
1 three | |
3 four | |
9 five |
OlderNewer