This document discusses optimizations for Java programs to better utilize CPUs, especially newer CPU instructions. It covers how Java code is compiled to bytecode then JIT compiled to machine code at runtime. Improvements in OpenJDK 9-11 are highlighted, including support for Intel AVX-512, fused multiply-add, SHA extensions, and reducing penalties when switching between instruction sets. Optimizing math functions and string processing with SIMD is also discussed.
1. The document discusses RESTful APIs and gRPC, comparing their characteristics and use cases.
2. RESTful APIs typically use HTTP and JSON to access resources via URLs while gRPC uses protocol buffers and HTTP/2 for efficient streaming and RPC.
3. gRPC is better suited for microservices and mobile apps due to its ability to handle streaming and performance, while REST is more widely used due to its simplicity and support in most languages.
This document discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
1. The document discusses RESTful APIs and gRPC, comparing their characteristics and use cases.
2. RESTful APIs typically use HTTP and JSON to access resources via URLs while gRPC uses protocol buffers and HTTP/2 for efficient streaming and RPC.
3. gRPC is better suited for microservices and mobile apps due to its ability to handle streaming and performance, while REST is more widely used due to its simplicity and support in most languages.
This document discusses messaging queues and platforms. It begins with an introduction to messaging queues and their core components. It then provides a table comparing 8 popular open source messaging platforms: Apache Kafka, ActiveMQ, RabbitMQ, NATS, NSQ, Redis, ZeroMQ, and Nanomsg. The document discusses using Apache Kafka for streaming and integration with Google Pub/Sub, Dataflow, and BigQuery. It also covers benchmark testing of these platforms, comparing throughput and latency. Finally, it emphasizes that messaging queues can help applications by allowing producers and consumers to communicate asynchronously.
This document discusses CASL2 and COMET2 emulators. It provides background on CASL2, a 16-bit CISC emulator, and COMET2, which uses x86 assembly. It also shares links to documentation on the IPA programming language standards and the Tiamat assembler tool. Code samples are given in both CASL2 and COMET2 assembly to illustrate differences between the two platforms.
8. Generics
02. GoにおけるGenerics
// 定義
func Map[E, T any](s []E, f func(E) T) []T {
r := make([]T2, len(s))
for i, v := range s {
r[i] = f(v)
}
return r
}
/*
Goの特徴として,型名を変数名の後ろに書く.
GenericsはGo2で実装されると噂されていたが,Go1で実装される
ことが決定した.
*/
今年1月にAcceptされた.
山括弧<T>ではなく
角括弧[T]が採用さ
れた.
29. // この形式は構文エラーにはならないが,サポートされない.
func (S) Identity[T any](v T) T { return v }
// Interfaceは許される
type Identify[T any] interface {
Identity(v T) T
}
// レシーバメソッドに型パラメータを持たない場合は許される
type Slice[T any] []T
func (s Slice[T]) Identity(v T) T { return v }
Genericsデモ
04. これからのGo
No parameterized methods
Interfaceや型定義
に型パラメータを持
たせる記述は可能.
32. // 並べられるという制約を定義
type Ordered interface {
// 型を列挙できる
// 「~int」は「int」を基底に持つ型を内包できる
~int | ~uint | string
}
func Smallest[T Orderd] (x, y T) T {
if x < y {
return x
}
return y
}
Genericsデモ
04. これからのGo
Constraint elements
Interfaceに制約を
持たせる文法が追
加された.