Accelerate string concatenation in Go with your own hand.

Accelerate string concatenation in Go with your own hand.
 
Today we will accelerate the gluing of short lines in Go by 30%. And for this we do not need to modify Go itself, all this will be implemented as third-party library .
 
Under the cat you are waiting for:
 
 
Comparison + , strings.Builder and the proper concatenation function  
Details of the internal device of rows in Go  
Very little assembler  

 

This article can also be considered a pretext to discuss CL123256: runtime, cmd /compile: specialize concatstring2 . Ideas for improving this change list ...

+ 0 -

1M HTTP rps to 1 cpu core. DPDK instead of nginx + linux kernel TCP /IP

I want to talk about such a thing as DPDK ( https://www.dpdk.org/ ) - this is a framework for working with the network bypassing the kernel. Those. you can write directly from userland in the network card queue, without the need for any system calls. This saves a lot of overhead for copying and stuff. As an example, I'll write an application that sends a test page to http and compare it in speed with nginx.
 
here . Stable do not take it - it did not work for me on EC? take ??? - it all started. Before you start, you need to reserve the system hugepages ( ...
+ 0 -

Memory expansion (Memory Disclosure) of the kernel in modern OS

Memory expansion (Memory Disclosure) of the kernel in modern OSUnder the cat there is a translation of
introductory part
document Detecting Kernel Memory Disclosure with x86 Emulation and Taint Tracking ( Article Project Zero ) From Mateusz Jurczyk .
 
In the translated part of the document:
 
 
Specificity of C programming language (within the scope of the problem of memory expansion)
 
specificity of the kernels of Windows and Linux (within the scope of the problem of memory expansion)
 
the importance of the disclosure of kernel memory and the impact on OS
security.  
existing methods and techniques for detecting and countering the memory ...
+ 0 -

Go compiler: the language of the SSA optimization rules

Go compiler: the language of the SSA optimization rules
 
In the compiler gc for the description of Static Single Assignment (SSA) optimization rules uses a special Lisp-like object-oriented language ( DSL ).
 

I propose to analyze the main elements of this language, its features and limitations.
 
As an exercise, let's add a compiler to Go that generates an instruction that it did not generate before, optimizing the expression a * b + c .


 

This is the first article in the series about the insides Go SSA compiler backend ...

+ 0 -

Three short stories about the Windows registry

 
Good afternoon, dear readers.
 
 
The registry is one of the most visible and significant Windows systems. It is unlikely that there will be a person who has not heard of him. Having been programming for Windows for about 20 years, I thought I knew everything about it. But from time to time something new appears, which shows me how wrong I was. Therefore, today I want to tell you about the unusual ways of working with the registry, which I met while researching rootkits, and which surprised me.
 
 
Three short stories about the Windows registry
 

History first. Values ​​and registry keys names are


 
We all know that Windows has some naming ...[/h]
+ 0 -

Release of Rust ???

The Rust development team is pleased to announce the release of the new version of Rust: ???. Rust is a system programming language aimed at security, speed, and parallel execution of code.
 
If you have a previous version of Rust installed with rustup, then you just need to run
to update Rust to version ???.
 
$ rustup update stable
 
If you have not already installed rustup, you can set it to from the corresponding page of our website. With detailed notes to the release of Rust ??? ...
+ 0 -

We start Git for Windows under ReactOS

We start Git for Windows under ReactOSGood day to all!
 
My name is Stanislav, and I like to write code. This is my first article on Habré, which I spodviglo several factors:
 
 
The lack of technical articles in the ReactOS
hub.  
The recent Return of Geektimes to Habr
 
The possibility of collect ReactOS in ReactOS
 
Quite an interesting case of fixing the problem in ReactOS, in which I was directly involved
 
 
Let me introduce you to the perpetrators of this celebration (the corrected bug that prevented the launch of Git in ReactOS) - the Croatian developer Hermès Bélusca-Maïto (hereinafter simply Hermes, with the nickname ...
+ 0 -

Intercepting functions in the Linux kernel using ftrace

Intercepting functions in the Linux kernel using ftrace
 
In one project related to the security of Linux systems, we needed to intercept calls to important functions inside the kernel (such as opening files and running processes) to enable monitoring of activity in the system and preventive activity blocking of suspicious processes.
 
 
In the development process, we managed to invent a fairly good approach, which makes it convenient to intercept any function in the kernel by name and execute its code around its calls. The interceptor can be installed from the bootable GPL-module, without rebuilding the kernel. The approach supports kernels of versions ???+ for ...
+ 0 -

Two-factor authentication in Windows and data encryption without a CA and domain

Two-factor authentication in Windows and data encryption without a CA and domainToday we will describe how you can quickly and easily configure two-factor authentication and encrypt important data, even with the possibility of using biometrics. The solution will be relevant for small companies or simply for a personal computer or laptop. It is important that for this we do not need a public key infrastructure (PKI), a server with a Certificate Services role, or even a domain (Active Directory). All system requirements will be reduced to the Windows operating system and the user has an electronic key, and in the case of biometric authentication, the fingerprint reader, which...
+ 0 -

Using std :: optional in C ++ 17

Using std :: optional in C ++ 17
 
Let's take a couple of the two types - What can you do with a composition of this kind?
 

In this article I will tell you about std :: optional - A new helper type added to C ++ 17. This is a wrapper for your type and the flag indicates whether your value is initialized or not. Let's see where this can be useful.


 

Introduction


 

By adding logical flags to other types, you can achieve what is called "Nullable types". As mentioned earlier, the flag is used to indicate whether a value is available or not. Such a wrapper expressively represents an object that can be empty (not through ...

+ 0 -