swift 6.0+ performance tweaks 3x-6x (#9067)

* start/stop measurements

* tweaks

* add 6.0 annotations

* remove some inlines

* address feedback

* address wasi + let

* adopt flex buffers

* flex buffers benchmarks
This commit is contained in:
blindspot
2026-06-18 15:23:53 +02:00
committed by GitHub
parent 5982eb6495
commit 81edeb17d9
12 changed files with 288 additions and 27 deletions

View File

@@ -163,7 +163,7 @@ public struct Verifier {
/// - Parameter position: Current position to be read
/// - Throws: `inBuffer` errors
/// - Returns: a value of type `T` usually a `VTable` or a table offset
internal func getValue<T>(at position: Int) throws -> T {
internal func getValue<T: BitwiseCopyable>(at position: Int) throws -> T {
try inBuffer(position: position, of: T.self)
return _buffer.read(def: T.self, position: position)
}