Google C++ Style Guideownership with smart pointers. “Ownership” is a bookkeeping technique for managing dynamically allocated memory (and other resources). The owner of a dynamically allocated object is an object or function that the last std::shared_ptr is destroyed. • It’s virtually impossible to manage dynamically allocated memory without some sort of ownership logic. • Transferring ownership of an object can be cheaper than copying readabil- ity and complexity costs. • APIs that transfer ownership force their clients into a single memory man- agement model. • Code using smart pointers is less explicit about where the resource releases0 码力 | 83 页 | 238.71 KB | 1 年前3
Google Python Style Guidethe state of local variables and control flow are preserved for each call. A generator uses less memory than a function that creates an entire list of values at once. Cons: None. Decision: Fine. Use items(): ... No: if (x): bar() if not(x): bar() return (foo) Indentation link Indent your code blocks with 4 spaces. Never use tabs or mix tabs and spaces. In cases of implied line continuation, you the runtime will actually run the file’s destructor. Different Python implementations use different memory management techniques, such as delayed Garbage Collection, which may increase the object’s lifetime0 码力 | 30 页 | 94.81 KB | 1 年前3
Google Java Style Guidesingle block. If there are both static and non-static imports, a single blank line separates the two blocks. There are no other blank lines between import statements. Within each block the imported names contains only a single statement. 4.1.2 Nonempty blocks: K & R style Braces follow the Kernighan and Ritchie style (”Egyptian brackets”) for nonempty blocks and block-like constructs: • No line break before } } }; A few exceptions for enum classes are given in Section 4.8.1, Enum classes. 4.1.3 Empty blocks: may be concise 5 An empty block or block-like construct may be closed immediately after it is0 码力 | 19 页 | 84.76 KB | 1 年前3
Google's R Style Guidestatement; however, you must consistently either use or not use curly braces for single statement blocks. if (is.null(ylim)) { ylim <- c(0, 0.06) } xor (but not both) if (is.null(ylim)) ylim <- c(0,0 码力 | 8 页 | 47.42 KB | 1 年前3
01 Structure of Scientific Papers - Introduction to Scientific Writing WS2021/22 Cost-based optimization of integration flows Systems support for time series forecasting In-memory indexing and query processing Data Management Group DB group https://github.com/ apache/systemds Ex. Compressed Linear Algebra Problem: Iterative ML algorithms + memory-bandwidth-bound operations crucial to fit data in memory automatic lossless compression Sub-problems: #rows>>#cols, column optimal model. It is crucial for performance to fit the data into single-node or distributed main memory. % 2. Say why it's an interesting problem General-purpose, heavy- and lightweight compression techniques0 码力 | 36 页 | 1.12 MB | 1 年前3
03 Experiments, Reproducibility, and Projects - Introduction to Scientific Writing WS2021/22Over-specified: cat /proc/cpuinfo cat /proc/meminfo Recommendation HW components: #nodes, CPUs, memory, network, I/O SW components: OS, programming language, versions, other software Baselines and System-specific tracing/statistics top / htop / iotop (looks CPU bound) perf -stat -d ./run.sh (no, it’s memory-bandwidth bound) Experiments and Result Presentation Performance counter stats for './run.sh':0 码力 | 31 页 | 1.38 MB | 1 年前3
共 6 条
- 1













