Quinton Miller
Quinton Miller
The signatures of `Benchmark.ips` and `Benchmark::IPS::Job#initialize` are: ```crystal module Benchmark extend self def ips(calculation = 5, warmup = 2, interactive = STDOUT.tty?, &) end module IPS class Job def initialize(calculation...
Resolves #10907.
`Benchmark.ips` always prints its result to `STDOUT` in a nicely formatted table: ```crystal Benchmark.ips do |b| b.report("foo") { Array.new(1000, 0) } b.report("bar") { Array.new(5000, 0) } end ``` ``` foo...
This is a proof of concept to show that we don't need the macro `run` here at all. Whether this macro is indeed faster than the existing `src/ecr/process.cr` for all...
The following is currently a compilation error until #5427 is resolved: ```crystal class Foo(N) end class Bar(T) @x : Foo(sizeof(T)) # Error: can't use sizeof(T) as a generic type argument...
Fixes #14702.
The name `NilableType` suggests that other types like `NilableReferenceUnionType` and `NilableProcType` inherit from it, but this is not the case.
It is possible to use nilable `Proc`s as parameter types of lib funs or field types of lib structs: https://github.com/crystal-lang/crystal/blob/2d71e3546f700b5ade54d10d455da69f78adb65f/src/compiler/crystal/semantic/lib.cr#L284-L285 But actually assigning anything to them doesn't seem to work:...
The following: ```crystal fun foo : -> Int32 -> { 1 } end ``` produces a codegen error: ``` Module validation failed: Function return type does not match operand type...
LLVM 16.0.0-rc4 is about to be released. Getting Crystal to work on LLVM 16 is a walk in the park compared to [LLVM 15](https://github.com/crystal-lang/crystal/pull/13173), as it requires just minor changes...