[2019-05-28] Rust Daily: WASI use of general-purpose computing block chain

"Embedded" Hawk-Rust Series: Raspberry Pi camera drivers

#RaspberryPi

Raspberry Pi provides a GPIO (General Purpose Input / Output) pin, an electrical component allows you to control the physical computing and explore things (IoT).
Raspberry Pi camera module is the perfect accessory, which allows users to take still pictures and record video in full HD.

HAWK is a project based on image recognition Rust, which is to implement two-factor authentication through the use of RFID card for user identification and Image user authentication. This article shows how to use the program Rust trigger Raspberry Pi camera.


WASI use of general-purpose computing block chain

#wasi

This article comes from OasisLabs, we introduced the application WASI (Web Assembly System Interface) on the block chain. Currently Oasis platform technology architecture is currently being implemented around the WASM, WASI and block chain.

(OasisLabs professor Dawn Song and colleagues from the University of California, Berkeley, founded block chain project, based on trusted hardware block chain and want to build high-performance trusted cloud platform.)

Why do they want to WASI for block chain?

WASI goal is to use for the block chain around WASI rapid development of communities and infrastructure. Wasm than creating another alternative interfaces, WASI block chain allows developers to take advantage of the resources the broader developer community. In this way, imagine the future block chain will be another tool in the toolbox cloud developers.

OasisLabs team also presented a special RFC of a block chain WASI, WASI want to make block chain context marked for expansion.


Rust vs C ++: Parallel CPU core 36 Performance test

#cpp #rayon

It was against Rust / Rayon (multithreading library Rust implemented) and C ++ / OpenMP (similar to rayon of c ++ libraries) conducted performance tests on 36 core machine.

Rust 36 threads:

Running on 36 Threads
BabelStream
Version: 0.5
Implmentation: Rust
Running kernels 100 times
Precision: double
Array size: 268.4 MB (=0.3 GB)
Total size: 805.3 MB (=0.8 GB)
Function	Mbytes/sec	Min (sec)	Max		Average
Copy		50552.817	0.01062		0.02924		0.01143
Mul		39680.038	0.01353		0.01510		0.01443
Add		45828.953	0.01757		0.01874		0.01820
Triad		41769.002	0.01928		0.02206		0.02029
Dot		43584.260	0.01232		0.01327		0.01273

CPP / OMP 36 threads:

Running on 36 Threads
BabelStream
Version: 3.4
Implementation: OpenMP
Running kernels 100 times
Precision: double
Array size: 268.4 MB (=0.3 GB)
Total size: 805.3 MB (=0.8 GB)
Function    MBytes/sec  Min (sec)   Max         Average     
Copy        87745.870   0.00612     0.00710     0.00684     
Mul         79315.382   0.00677     0.00762     0.00736     
Add         89995.047   0.00895     0.01029     0.00992     
Triad       91574.889   0.00879     0.01012     0.00975     
Dot         118144.442  0.00454     0.00504     0.00490   

For this result, we can take a look at Reddit discussion threads where some feedback. Comments area half the people think that the reason why Rust slow, because rayon The cause of the NUMA-aware (Numa aware) are not supported. Whether Rust language, or Rayon do not currently support this feature, unless and other memory allocator do intend to stabilize.

(NUMA multiprocessor system for on and IBM® POWER® x86 architecture platform. In a system having a NUMA characteristics, each processor has a local memory is available, you can access the memory allocated to other processors. faster .NUMA node memory access speed local memory of the processor and memory is a collection of closely interrelated. memory access speed is faster than in the node outside the node. If the program can sense NUMA, it is related to computing resources, It will be placed into a different physical NUMA nodes. While still NUMA nodes between two extensions of resource use will be optimized.)

But unknown whether OpenMP test code takes advantage of NUMA-aware to improve performance, but it seems OpenMP support NUMA (uncertain).


"Discussion" ndarray vs nalgebra

#ml #statistical_computing

The discussions posted for this problem: ndarray and nalgebra two libraries What is the difference? The advantages and disadvantages? Which library better chance of being applied machine learning and scientific computing?

Review summary:

  1. Ndarray and nalgebra domain for two different problems.
  2. Ndarray and nalgebra repeated portion only linear algebra system, but focuses more on nalgebra linear algebraic system, but only 1D 2D vectors and matrices.
  3. Ndarray similar numpy, applied to n-dimensional data processing.
  4. Once in Rust const generics is stable, both libraries will be heavily influenced by, maybe in the future there will be more features overlap.
  5. nalgebra is pure in Rust, ndarray a OpenBLAS backend. So in terms of performance, some programs might ndarray performed better (pure Rust implementation to be optimized).
  6. If the aim is for engineering and mathematics, nalgebra is by far the best choice. Nalgebra of the best features is the dimension checked at compile time, which means that math error code will not compile.

Reddit discussion


vecmerge: provides a convenient consolidation of macro Vec

#vec

fn concat(a: i32, b: i32, c: Vec<i32>, d: i32, e: i32, f: i32) -> Vec<i32> {
    vecmerge!([a,b] + c + [d,e,f])
}

vecmerge


Rust supports a variety of ways

#Rust

If you want to support the development of Rust, there are many ways to support Rust:

  • Contribute code.
  • Written documents, books, blog, video and so on.
  • To answer questions at the forum, Stack Overflow, Reddit, Matrix or Discord.
  • Financial support.

Especially the financial support that can help them focus on the contribution of staff time compensation, making open source more sustainable. If you prefer, you can view a list of donors who initiated Aaron.


"Series" use Rust create a static file server Part 2

#Http

Read More


From Daily Group @Chaos

Daily subscription address:

Independent daily subscription address:

Community learning platform subscription:

Guess you like

Origin blog.csdn.net/u012067469/article/details/90646737