• Kian Lee Teo

    Enable AHCI

    The Advanced Host Controller Interface (AHCI) is a paramount feature for ensuring that Windows will support all of the features that come with running an SSD on your computer, especially the TRIM feature, which allows Windows to help the SSD perform its routine garbage collection. The term “garbage collection” is used to describe the phenomenon that occurs when a drive gets rid of information that is no longer considered to be in use.

    To enable AHCI, you’ll have to enter the BIOS of your computer and enable it somewhere within its settings.

    Enable TRIM

    TRIM is vital to extending the lifespan of your SSD, namely by keeping it clean under the hood. Windows 10 should enable this by default, but it’s worth double-checking that it has been enabled.

    To make sure TRIM is enabled, open your command prompt and enter the following:

    fsutil behavior set disabledeletenotify 0

    Disable Indexing

    A good part of your SSD speed is consumed in indexing files for Windows search. This could be useful if you store everything you have on your SSD, but you might be annoyed by it if you experience slow-downs due to the periodic indexing process that occurs every time you add new data to the drive.

    posted in Technology read more
  • Kian Lee Teo



    To disable the crash recovery feature, set browser.sessionstore.resume_from_crash to false:

       * Type about:config in the Location Bar
       * Press Enter
       * Find browser.sessionstore.resume_from_crash
       * Double click to set it to false 

    To completely disable all session saving behavior, including the recording of session information, set browser.sessionstore.enabled to false:

       * Type about:config in the Location Bar
       * Press Enter
       * Find browser.sessionstore.enabled
       * Double click to set it to false

    posted in Technology read more
  • Kian Lee Teo

    Stock oversold, but market is bearish.

    posted in Investments read more
  • Kian Lee Teo

    Inline Functions

    The inline functions are a C++ enhancement feature to decrease the execution time (lower latency) of a program. Functions can be instructed to compiler to make them inline so that compiler can replace those function definition wherever those are being called. Compiler replaces the definition of inline functions at compile time instead of referring function definition at runtime.


    1. It speeds up your program by avoiding function calling overhead.
    2. It save overhead of variables push/pop on the stack, when function calling happens.
    3. It save overhead of return call from a function.
    4. It increases locality of reference by utilizing instruction cache.
    5. By marking it as inline, you can put a function definition in a header file (i.e. it can be included in multiple compilation unit, without the linker complaining)


    1. It increases the executable size due to code expansion.
    2. C++ inlining is resolved at compile time. Which means if you change the code of the inlined function, you would need to recompile all the code using it to make sure it will be updated
    3. When used in a header, it makes your header file larger with information which users don’t care.
    4. As mentioned above it increases the executable size, which may cause thrashing in memory. More number of page fault bringing down your program performance.
    5. Sometimes not useful for example in embedded system where large executable size is not preferred at all due to memory constraints.

    When to use

    Function can be made as inline as per programmer need. Some useful recommendation are mentioned below-

    1. Use inline function when performance is needed.
    2. Use inline function over macros.
    3. Prefer to use inline keyword outside the class with the function definition to hide implementation details.

    posted in Technology read more
  • Kian Lee Teo

    Difference between Implied Volatility &. Historical Volatility

    • Implied or projected volatility is a forward-looking metric used by options traders to calculate probability.
    • Implied volatility, as its name suggests, uses supply and demand, and represents the expected fluctuations of an underlying stock or index over a specific time frame.
    • With historical volatility, traders use past trading ranges of underlying securities and indexes to calculate price changes.
    • Calculations for historical volatility are generally based on the change from one closing price to the next.

    posted in Investments read more
  • Kian Lee Teo

    Implied Volatility

    Implied volatility is the parameter component of an option pricing model.

    Not directly observable, so it needs to be solved using the five other inputs of the model:

    • the market price of the option
    • the underlying stock price
    • the strike price
    • the time to expiration
    • the risk-free interest rate

    posted in Investments read more
  • Kian Lee Teo

    Historical Volatility
    Historical volatility (HV) is a statistical measure of the dispersion of returns for a given security or market index over a given period of time. This measure is calculated by determining the average deviation from the average price of a financial instrument in the given time period. Using standard deviation to calculate historical volatility. The higher the historical volatility value, the riskier the security.

    posted in Investments read more
  • Kian Lee Teo

    1. Install Cygwin (

    2. Install Required Cygwin Packages

    C:\cygwin64>setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel

    3. Download, Build and Install the Latest GCC

    Open a Cygwin terminal

    tar xf gcc-9.1.0.tar.gz

    That will create a subdirectory named gcc-4.9.2. Next, we’ll configure our GCC build.

    mkdir build-gcc
    cd build-gcc
    ../gcc-9.1.0/configure --program-suffix=-9.1.0 --enable-languages=c,c++ --disable-bootstrap --disable-shared

    Next, we’ll actually build the new GCC compiler suite, including C, C++ and the standard C++ library. This is the longest step.

    make -j4

    The -j4 option lets the build process spawn up to four child processes in parallel.

    Once that’s finished, install the new compiler:

    make install
    cd ..

    posted in Technology read more
  • Kian Lee Teo

    The Google Edge TPU coprocessor has support for TensorFlow Lite, or ‘machine learning at the edge’. The point of TensorFlow Lite isn’t to train a system, but to run an existing model.

    posted in Technology read more

Looks like your connection to Kian Lee Teo was lost, please wait while we try to reconnect.