- Parallel Computing Course - Stanford CS149, Fall 2023
- Performance-Aware Programming Series by Casey Muratori
- Algorithms for Modern Hardware
- Computer Systems: A Programmer's Perspective, 3/E - by Randal E. Bryant and David R. O'Hallaron, Carnegie Mellon University
- Performance Engineering Of Software Systems - am MITOCW course
- Parallel Programming 2020 by NHR@FAU
- Cpu Caches and Why You Care
//> using dep com.softwaremill.sttp.openai::ox:0.2.2 | |
//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 | |
//> using dep com.softwaremill.sttp.client4::ox:4.0.0-M17 | |
//> using dep com.softwaremill.ox::core:0.3.6 | |
//> using dep ch.qos.logback:logback-classic:1.5.7 | |
// Remember to set the OPENAI_KEY env variable! | |
package examples |
Disclaimer: Firstly, I'm not an expert in any of these libraries. I'm writing this from a position of sharing what I have learnt so far, but also hoping to be criticised and learn a lot more in the process.
Both fs2 and zio-streams document the need to make use of "Chunking". Here is what the zio-streams docs say:
Every time we are working with streams, we are always working with chunks. There are no streams with individual elements, these streams have always chunks in their underlying implementation. So every time we evaluate a stream, when we pull an element out of a stream, we are actually pulling out a chunk of elements.
So why streams are designed in this way? This is because of the efficiency and performance issues. Every I/O operation in the programming world works with batches. We never work with a single element.
While this is true that IO operations work with batches, from a programmers perspective it is sometimes easier
import jdk.internal.org.objectweb.asm.*; | |
import java.io.*; | |
import java.nio.file.*; | |
import java.nio.file.attribute.BasicFileAttributes; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.util.function.Consumer; | |
/** |
// TestMacro.scala | |
import scala.quoted.* | |
object TestMacro { | |
inline def name[E](e: E): String = ${ nameImpl[E]('e) } | |
def nameImpl[E: Type](e: Expr[E])(using Quotes): Expr[String] = { | |
import quotes.reflect.* |
Below is the list of publickly accessible NTP time servers located in Poland, along with their hostnames, IP addresses, Stratum levels, AS numbers and contact information.
List consists of trustworthy sources such as government agencies, scientific organizations, ISPs or major infrastructure providers. STRATUM 1 and 2.
If you're looking to use any of those NTP servers in business-critical production environment, please consider obtaining time from a time source directly, e.g. via GPS receiver or caesium atomic clock.
Host organization | Hostname(s) | IPv4 | IPv6 | STRATUM | ASN | Contact information |
---|---|---|---|---|---|---|
Główny Urząd Miar (Central Office of Measures) | tempus1.gum.gov.pl tempus2.gum.gov.pl |
194.146.251.100 194.146.251.101 |
N/A | 1 | AS50606 | [email protected] |
- AMD announced Ryzen 7000, Zen4 - https://www.anandtech.com/show/17399/amd-ryzen-7000-announced-zen4-pcie5-ddr5-am5-coming-fall
- Blog article: Compilers may generate branches for straight-line code - https://kristerw.github.io/2022/05/24/branchless/
- Paper: Intel Labs developed a quantum toolchain - https://arxiv.org/abs/2202.11142
I've been working on a side project for the past several days: making a Snake using purely reactive programming with ScalaJS. You can play it at https://wildfield.github.io/snake/. The source code at https://github.com/wildfield/snake-frp
Reader PSA: A lot of wheel reinvention and non-standard terminology ahead. This is not supposed to be a tutorial of any sorts, instead I just wanted to share a cool concept I've been working on.
Escape Analysis (EA) is a compiler analysis to answer the following questions for a given object O, method M, and thread T.
- Escapes(O, M): Does object O outlive the execution of method M? This may happen for instance if a reference to O is assigned to a global variable.
- Escapes(O, T): Does object O escape the current execution thread? This may happen for instance if a reference to O is copied to another thread.
Answers to these questions enable a compiler to perform a few highly effective optimizations, for instance, Stack Allocation (SA), Lock Elision (LE), and Scalar Replacement of Aggregates (SRA). Note that,
import java.nio.ByteBuffer | |
import java.util | |
import io.circe.parser._ | |
import io.circe.syntax._ | |
import io.circe.{Decoder, Encoder, _} | |
import org.apache.kafka.common.errors.SerializationException | |
import org.apache.kafka.common.serialization.{Deserializer, Serde, Serializer} | |
import scala.util.Try |