- Rent a packet.com m1.xlarge.x86 box which is an Intel Xeon E5-2650 V4 (2x) with 24 Cores @ 2.2 Ghz at $1.70/hr.
- On the box run the SHF performance test in various combinations using 100 million key values.
- The SHF performance test can be compiled with or without spin locks, in order to test the spin lock over head.
- Obviously when compiled without spin locks, concurrent access is not possible.
- However, when compiled without spin locks, multiple single CPU, non-concurrent instances can run in parallel AKA 'shared nothing'.
- E.g. comparing 12 CPUs running SHF with locks versus 12 CPUs running individual shared nothing, single CPU SHF instances, reveals the overhead of not using shared nothing.
Often using C array indexing has benefits over using pointers:
- Can be the same speed or faster code. Compiler does a good job.
- Code easier to comprehend.
- Log / instrumentation easier to comprehend.
- Special debug log / instrumentation easier to write and comprehend.
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
use strict; | |
# Your Task | |
# You’re part of the team that explores Mars by sending remotely controlled vehicles to the surface of the planet. Develop an interface that translates the commands sent from earth to instructions that are understood by the rover. | |
# Requirements | |
# You are given the initial starting point (x,y) of a rover and the direction (N,S,E,W) it is facing. | |
# The rover receives a character array of commands as a string, for example "fffrfbrflb". | |
# Implement commands that move the rover forward/backward (f,b). | |
# Implement commands that turn the rover left/right (l,r). |
Disclaimer: Don't know much about libarchive... yet!
- When reading a streamed archive using archive_read_open() [1] and archive_read_extract() [2] then a callback is called one or more times to read chunks of the archive.
- This creates an issue if (a) your program needs to wait for the next chunk to arrive, and/or (b) you want to process multiple archive streams in the same thread.
- Effectively archive_read_open() [1] and archive_read_extract() [2] block until all the necessary number of archive stream chunks have been read via the callback.
- Note: This is a continuation from Part 1 [1].
- Note: This is a continuation from Part 2 [1].
[1] Experiments with libarchive read blocking: Part 2
- Possible advantage: We might not need to modify libarchive itself!
- Note: This is a continuation from Part 3 [1].
[1] Experiments with libarchive read blocking: Part 3
- Modify
cwrap.pl
to report the stack pointer on every log line. - Modify
./doit.sh
to runexample3.c
with two archives, and show the SHA256 sums of the extracted files.
Which missing feature in gcc would make tracing function calls in userspace C/C++ applications easier
Let's say we want to compile a larger C/C++ application with 80,000 unique functions so that at run-time the function call-tree is output for code comprehension and debugging purposes.
There are a couple of options to do this today which spring to mind: