Upgrading from OxygenOS 1.0.3 to 2.1.4 on the OnePlus One Smartphone

This short guide describes how to upgrade your OnePlus One Smartphone from OxygenOS version 1.0.3 to 2.1.4. In this case the initial version of your OS is of no relevant importance — you can also upgrade from version 1.0.0, but see Installing OxygenOS 1.0 on the OnePlus One Smartphone and Upgrading from OxygenOS 1.0.0 to 1.0.3 on the OnePlus One Smartphone.

Before start we need adb and fastboot. On ArchLinux these programs are in android-tools:

pacman -Syu android-tools

Copying the OS image to the phone takes almost three minutes.

adb devices

time adb push OnePlus_Bacon_OxygenOS_201601190107.zip /sdcard/
4842 KB/s (767726302 bytes in 154.821s)

real    2m34.909s
user    0m0.007s
sys     0m0.683s

Upgrading from OS 1.0.3 to 2.1.4 is apparently not possible by using TWRP. OxygenOS 2.1.4 for the OnePlus One says
Continue reading

Advertisements

Performance Comparison C vs. Lua vs. LuaJIT vs. Java

Ico Doornekamp on 20-Dec-2011 asked why a C version of a Lua program ran more slowly than the Lua program. The mentioned discrepancy cannot be reproduced, neither on an AMD FX-8120, nor an Intel i5-4250U processor. Generally a C version program is expected to be faster than a Lua program.

Here is the Lua program called lua_perf.lua:

local N = 4000
local S = 1000

local t = {}

for i = 0, N do
        t[i] = {
                a = 0,
                b = 1,
                f = i * 0.25
        }
end

for j = 0, S-1 do
        for i = 0, N-1 do
                t[i].a = t[i].a + t[i].b * t[i].f
                t[i].b = t[i].b - t[i].a * t[i].f
        end
        print(string.format("%.6f", t[1].a))
end

It computes values for a circle.
lua_perf

Continue reading