Repro script for comparing two commits with a heavier synthetic workload.
Usage:
bash swiftsoup-ab-bench.shDefaults (override with env vars):
| git describe --exact-match 2> /dev/null || git describe --all --long | perl -pe 's/^heads\///' |
| import Foundation | |
| import LRUCache | |
| @globalActor | |
| fileprivate actor LRUFileCacheActor { | |
| static var shared = LRUFileCacheActor() | |
| } | |
| #if DEBUG | |
| fileprivate let debugBuildID = UUID() |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title>IntersectionObserver vs getBoundingClientRect (50,000 elements)</title> | |
| <style> | |
| #theContainer { width: 100vw; max-width: 100%; } | |
| .test-elem { margin:1px; display:inline-block; width:10px; height:10px; background:#ddd; } | |
| </style> | |
| </head> | |
| <body> |