In C++ programming, data structures are essential for organizing and manipulating data. When it comes to storing and manipulating data, one data structure stands out above the rest – the std::vector. Efficient Memory Allocation One of the primary benefits of std::vector is its efficient memory allocation. std::vector uses contiguous memory allocation, which means that the
Read more
Tag: optimization
Release Notes For Linux v2.0
Posted onThis is the release notes for linux release v2.0 (source code: linux-2.0.tar.gz) with format adjusted by removing/replacing tabs/spaces/new lines/formatting marks. This notes document can give us an understanding of the early development of the Linux kernel. The original ASCII formatted version is at the end of this post. Intro This document contains a list of
Read more
Compress PNG Images on Linux
Posted onPNG images already use DEFLATE data compression algorithm involving a combination of LZ77 and Huffman coding. But the PNG images can be further compressed by removing non-important metadata or using lossy compression to save storage space and/or data transfer bandwidth. In this post, we introduce 2 compression ways with tools available on Linux. Lossless compression
Read more
GCC May “Save” You Some Recursive Functions Calls: an Analysis of a Function Call Stack Length Example
Posted onWe know compilers like gcc can do lots smart optimization to make the program run faster. Regarding functions call optimization, gcc can do tail-call elimination to save the cost of allocating a new stack frame, and tail recursion elimination to turn a recursive function to non-recursive iterative one. gcc can even transform some recursive functions
Read more
Large-but-correctly-aligned-and-optimized code is faster than less-bytes-per-instruction/opcode-packed code
Posted onIs large-but-correctly-aligned-and-optimized code faster than less-bytes-per-instruction/opcode-packed code? Alex Ionescu mentioned in ros-dev mailing list: I’m not sure why you would want kernel code to be “smaller” instead of “faster” though — on modern processors for cases like interrupts and such, large-but-correctly-aligned-and-optimized code is faster than less-bytes-per-instruction/opcode-packed code. ie: mov eax, [foo] add eax, 1 mov
Read more
7 Common On Page SEO Mistakes You Are Making and You Should Not
Posted onWith Google algorithm becoming more intelligent with each passing day, the margin for errors has significantly reduced over the past decade. Back in the day, you might get away with keyword stuffing but today, the same offense will strike off your website from Google search engine results. No one wants that, right. To save you
Read more
Accelerating WordPress with WP Super Cache, Opcache and Autoptimize
Posted onWordPress can be very fast after some effort on performance optimization with the help from its plenty of plugins. Possible ways include using cache to cut down the number of database queries, improves HTML/JavaScript/CSS code, and optimizing PHP’s performance with opcode cache. In this post, we introduce how to speed up WordPress with OPcache, page
Read more
Favorite Sayings by John Ousterhout – Precious Experience and Advice for Building Systems
Posted onJohn Ousterhout is a professor of Deparment of Computer Science from Stanford University. One recent project he is working on is the RAMCloud, a “new class of storage, based entirely in DRAM, that is 2-3 orders of magnitude faster than existing storage systems”. He posts his “Favorite Sayings” on his homepage. These sayings are precious
Read more
x86-64 ISA / Assembly Programming References
Posted onThis post collect the reference resource for x86-64 (also know as Intel 64, AMD 64) ISA / assembly language programming. x86-64 is a 64-bit extension of the Intel x86 instruction set. ==x86-64 Assembly Programming== Introduction to Computer Systems Resources (15-213 Introduction to Computer Systems Resources from CMU) Lots materials for learning machine-level programming on the
Read more
How to Generate Mixed Source and Assembly List from Source Code using GCC
Posted onWhen debugging and optimizing programs, developers sometimes need to generate and investigate into the assembly generated by the compiler. Generating a mixed source and assembly list will help a lot for debugging and optimization. gcc can achieve this by working with the assembler. Generate assembly list mixed with the source code Just add these gcc
Read more
Friendly WordPress Navigation Using Page Numbers Instead of Next and Previous Links
Posted onThe navigation will be more user friendly with page numbers instead of next and previous links since users can navigate much quicker to the page they want to see especially when there are a lot of pages. It is also good method for SEO (Search Engine Optimization) because it creates a tighter inner link structure.
Read more