JuliaDynamics / ResumableFunctions.jl

C# style generators a.k.a. semi-coroutines for Julia.
Other
157 stars 18 forks source link

fix loss of variable scope in the finite state machine #92

Closed Krastanov closed 1 week ago

Krastanov commented 6 months ago

this is not remotely ready

github-actions[bot] commented 6 months ago
Benchmark Result # Judge result # Benchmark Report for */home/runner/work/ResumableFunctions.jl/ResumableFunctions.jl* ## Job Properties * Time of benchmarks: - Target: 25 Feb 2024 - 22:46 - Baseline: 25 Feb 2024 - 22:47 * Package commits: - Target: da743b - Baseline: 8b64f6 * Julia commits: - Target: b8a0a3 - Baseline: b8a0a3 * Julia command flags: - Target: None - Baseline: None * Environment variables: - Target: None - Baseline: None ## Results A ratio greater than `1.0` denotes a possible regression (marked with :x:), while a ratio less than `1.0` denotes a possible improvement (marked with :white_check_mark:). Only significant results - results that indicate possible regressions or improvements - are shown below (thus, an empty table means that all benchmark results remained invariant between builds). | ID | time ratio | memory ratio | |---------------------------------------------------------|---------------|--------------| | `["hardcoded types", "BigInt", "Closure"]` | 1.06 (5%) :x: | 1.00 (1%) | | `["hardcoded types", "BigInt", "Direct"]` | 1.13 (5%) :x: | 1.00 (1%) | | `["hardcoded types", "BigInt", "Iteration protocol"]` | 1.14 (5%) :x: | 1.00 (1%) | | `["hardcoded types", "Int64", "Closure"]` | 1.07 (5%) :x: | 1.00 (1%) | ## Benchmark Group List Here's a list of all the benchmark groups executed by this job: - `["hardcoded types", "BigInt"]` - `["hardcoded types", "Int64"]` ## Julia versioninfo ### Target ``` Julia Version 1.12.0-DEV.73 Commit b8a0a3978cc (2024-02-25 02:48 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.2.0-1019-azure #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 0 MHz 548 s 0 s 148 s 1733 s 0 s #2 0 MHz 400 s 0 s 93 s 1938 s 0 s #3 0 MHz 569 s 0 s 144 s 1710 s 0 s #4 0 MHz 701 s 0 s 104 s 1618 s 0 s Memory: 15.606903076171875 GB (13655.9375 MB free) Uptime: 245.98 sec Load Avg: 1.06 0.62 0.26 WORD_SIZE: 64 LLVM: libLLVM-16.0.6 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` ### Baseline ``` Julia Version 1.12.0-DEV.73 Commit b8a0a3978cc (2024-02-25 02:48 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.2.0-1019-azure #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 0 MHz 568 s 0 s 151 s 2131 s 0 s #2 0 MHz 417 s 0 s 97 s 2339 s 0 s #3 0 MHz 673 s 0 s 162 s 2010 s 0 s #4 0 MHz 941 s 0 s 132 s 1774 s 0 s Memory: 15.606903076171875 GB (13937.87109375 MB free) Uptime: 288.32 sec Load Avg: 1.03 0.67 0.29 WORD_SIZE: 64 LLVM: libLLVM-16.0.6 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` --- # Target result # Benchmark Report for */home/runner/work/ResumableFunctions.jl/ResumableFunctions.jl* ## Job Properties * Time of benchmark: 25 Feb 2024 - 22:46 * Package commit: da743b * Julia commit: b8a0a3 * Julia command flags: None * Environment variables: None ## Results Below is a table of this job's results, obtained by running the benchmarks. The values listed in the `ID` column have the structure `[parent_group, child_group, ..., key]`, and can be used to index into the BaseBenchmarks suite to retrieve the corresponding benchmarks. The percentages accompanying time and memory values in the below table are noise tolerances. The "true" time/memory value for a given benchmark is expected to fall within this percentage of the reported value. An empty cell means that the value was zero. | ID | time | GC time | memory | allocations | |---------------------------------------------------------|----------------:|--------:|--------------:|------------:| | `["hardcoded types", "BigInt", "Channels csize=0"]` | 196.185 μs (5%) | | 7.69 KiB (1%) | 312 | | `["hardcoded types", "BigInt", "Channels csize=1"]` | 199.079 μs (5%) | | 7.75 KiB (1%) | 312 | | `["hardcoded types", "BigInt", "Channels csize=100"]` | 56.073 μs (5%) | | 9.56 KiB (1%) | 314 | | `["hardcoded types", "BigInt", "Channels csize=20"]` | 63.318 μs (5%) | | 8.11 KiB (1%) | 313 | | `["hardcoded types", "BigInt", "Closure optimized"]` | 3.966 μs (5%) | | 4.47 KiB (1%) | 192 | | `["hardcoded types", "BigInt", "Closure statemachine"]` | 4.444 μs (5%) | | 4.53 KiB (1%) | 195 | | `["hardcoded types", "BigInt", "Closure"]` | 5.240 μs (5%) | | 4.47 KiB (1%) | 192 | | `["hardcoded types", "BigInt", "Direct"]` | 3.788 μs (5%) | | 4.39 KiB (1%) | 188 | | `["hardcoded types", "BigInt", "Iteration protocol"]` | 3.845 μs (5%) | | 4.48 KiB (1%) | 191 | | `["hardcoded types", "BigInt", "ResumableFunctions"]` | 3.822 μs (5%) | | 4.50 KiB (1%) | 191 | | `["hardcoded types", "BigInt", "Task scheduling"]` | 29.024 μs (5%) | | 5.25 KiB (1%) | 197 | | `["hardcoded types", "Int64", "Channels csize=0"]` | 184.132 μs (5%) | | 3.02 KiB (1%) | 107 | | `["hardcoded types", "Int64", "Channels csize=1"]` | 187.589 μs (5%) | | 1.86 KiB (1%) | 29 | | `["hardcoded types", "Int64", "Channels csize=100"]` | 50.674 μs (5%) | | 3.67 KiB (1%) | 31 | | `["hardcoded types", "Int64", "Channels csize=20"]` | 57.367 μs (5%) | | 2.22 KiB (1%) | 30 | | `["hardcoded types", "Int64", "Closure optimized"]` | 17.647 ns (5%) | | | | | `["hardcoded types", "Int64", "Closure statemachine"]` | 33.940 ns (5%) | | | | | `["hardcoded types", "Int64", "Closure"]` | 2.252 μs (5%) | | 1.28 KiB (1%) | 82 | | `["hardcoded types", "Int64", "Direct"]` | 18.349 ns (5%) | | | | | `["hardcoded types", "Int64", "Iteration protocol"]` | 33.940 ns (5%) | | | | | `["hardcoded types", "Int64", "ResumableFunctions"]` | 33.627 ns (5%) | | | | | `["hardcoded types", "Int64", "Task scheduling"]` | 17.242 μs (5%) | | 2.03 KiB (1%) | 85 | ## Benchmark Group List Here's a list of all the benchmark groups executed by this job: - `["hardcoded types", "BigInt"]` - `["hardcoded types", "Int64"]` ## Julia versioninfo ``` Julia Version 1.12.0-DEV.73 Commit b8a0a3978cc (2024-02-25 02:48 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.2.0-1019-azure #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 0 MHz 548 s 0 s 148 s 1733 s 0 s #2 0 MHz 400 s 0 s 93 s 1938 s 0 s #3 0 MHz 569 s 0 s 144 s 1710 s 0 s #4 0 MHz 701 s 0 s 104 s 1618 s 0 s Memory: 15.606903076171875 GB (13655.9375 MB free) Uptime: 245.98 sec Load Avg: 1.06 0.62 0.26 WORD_SIZE: 64 LLVM: libLLVM-16.0.6 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` --- # Baseline result # Benchmark Report for */home/runner/work/ResumableFunctions.jl/ResumableFunctions.jl* ## Job Properties * Time of benchmark: 25 Feb 2024 - 22:47 * Package commit: 8b64f6 * Julia commit: b8a0a3 * Julia command flags: None * Environment variables: None ## Results Below is a table of this job's results, obtained by running the benchmarks. The values listed in the `ID` column have the structure `[parent_group, child_group, ..., key]`, and can be used to index into the BaseBenchmarks suite to retrieve the corresponding benchmarks. The percentages accompanying time and memory values in the below table are noise tolerances. The "true" time/memory value for a given benchmark is expected to fall within this percentage of the reported value. An empty cell means that the value was zero. | ID | time | GC time | memory | allocations | |---------------------------------------------------------|----------------:|--------:|--------------:|------------:| | `["hardcoded types", "BigInt", "Channels csize=0"]` | 195.753 μs (5%) | | 7.69 KiB (1%) | 312 | | `["hardcoded types", "BigInt", "Channels csize=1"]` | 199.530 μs (5%) | | 7.75 KiB (1%) | 312 | | `["hardcoded types", "BigInt", "Channels csize=100"]` | 55.804 μs (5%) | | 9.56 KiB (1%) | 314 | | `["hardcoded types", "BigInt", "Channels csize=20"]` | 63.007 μs (5%) | | 8.11 KiB (1%) | 313 | | `["hardcoded types", "BigInt", "Closure optimized"]` | 3.975 μs (5%) | | 4.47 KiB (1%) | 192 | | `["hardcoded types", "BigInt", "Closure statemachine"]` | 4.437 μs (5%) | | 4.53 KiB (1%) | 195 | | `["hardcoded types", "BigInt", "Closure"]` | 4.944 μs (5%) | | 4.47 KiB (1%) | 192 | | `["hardcoded types", "BigInt", "Direct"]` | 3.345 μs (5%) | | 4.39 KiB (1%) | 188 | | `["hardcoded types", "BigInt", "Iteration protocol"]` | 3.364 μs (5%) | | 4.48 KiB (1%) | 191 | | `["hardcoded types", "BigInt", "ResumableFunctions"]` | 3.924 μs (5%) | | 4.50 KiB (1%) | 191 | | `["hardcoded types", "BigInt", "Task scheduling"]` | 29.745 μs (5%) | | 5.25 KiB (1%) | 197 | | `["hardcoded types", "Int64", "Channels csize=0"]` | 183.701 μs (5%) | | 3.02 KiB (1%) | 107 | | `["hardcoded types", "Int64", "Channels csize=1"]` | 186.236 μs (5%) | | 1.86 KiB (1%) | 29 | | `["hardcoded types", "Int64", "Channels csize=100"]` | 50.674 μs (5%) | | 3.67 KiB (1%) | 31 | | `["hardcoded types", "Int64", "Channels csize=20"]` | 57.386 μs (5%) | | 2.22 KiB (1%) | 30 | | `["hardcoded types", "Int64", "Closure optimized"]` | 17.768 ns (5%) | | | | | `["hardcoded types", "Int64", "Closure statemachine"]` | 33.940 ns (5%) | | | | | `["hardcoded types", "Int64", "Closure"]` | 2.098 μs (5%) | | 1.28 KiB (1%) | 82 | | `["hardcoded types", "Int64", "Direct"]` | 18.349 ns (5%) | | | | | `["hardcoded types", "Int64", "Iteration protocol"]` | 33.940 ns (5%) | | | | | `["hardcoded types", "Int64", "ResumableFunctions"]` | 33.940 ns (5%) | | | | | `["hardcoded types", "Int64", "Task scheduling"]` | 17.232 μs (5%) | | 2.03 KiB (1%) | 85 | ## Benchmark Group List Here's a list of all the benchmark groups executed by this job: - `["hardcoded types", "BigInt"]` - `["hardcoded types", "Int64"]` ## Julia versioninfo ``` Julia Version 1.12.0-DEV.73 Commit b8a0a3978cc (2024-02-25 02:48 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) Ubuntu 22.04.4 LTS uname: Linux 6.2.0-1019-azure #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024 x86_64 x86_64 CPU: AMD EPYC 7763 64-Core Processor: speed user nice sys idle irq #1 0 MHz 568 s 0 s 151 s 2131 s 0 s #2 0 MHz 417 s 0 s 97 s 2339 s 0 s #3 0 MHz 673 s 0 s 162 s 2010 s 0 s #4 0 MHz 941 s 0 s 132 s 1774 s 0 s Memory: 15.606903076171875 GB (13937.87109375 MB free) Uptime: 288.32 sec Load Avg: 1.03 0.67 0.29 WORD_SIZE: 64 LLVM: libLLVM-16.0.6 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores) ``` --- # Runtime information | Runtime Info | | |:--|:--| | BLAS #threads | 2 | | `BLAS.vendor()` | `lbt` | | `Sys.CPU_THREADS` | 4 | `lscpu` output: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Vendor ID: AuthenticAMD Model name: AMD EPYC 7763 64-Core Processor CPU family: 25 Model: 1 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 Stepping: 1 BogoMIPS: 4890.84 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm Virtualization: AMD-V Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 64 KiB (2 instances) L1i cache: 64 KiB (2 instances) L2 cache: 1 MiB (2 instances) L3 cache: 32 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-3 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Mitigation; safe RET, no microcode Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected | Cpu Property | Value | |:------------------ |:---------------------------------------------------------- | | Brand | AMD EPYC 7763 64-Core Processor | | Vendor | :AMD | | Architecture | :Unknown | | Model | Family: 0xaf, Model: 0x01, Stepping: 0x01, Type: 0x00 | | Cores | 16 physical cores, 16 logical cores (on executing CPU) | | | No Hyperthreading hardware capability detected | | Clock Frequencies | Not supported by CPU | | Data Cache | Level 1:3 : (32, 512, 32768) kbytes | | | 64 byte cache line size | | Address Size | 48 bits virtual, 48 bits physical | | SIMD | 256 bit = 32 byte max. SIMD vector size | | Time Stamp Counter | TSC is accessible via `rdtsc` | | | TSC runs at constant rate (invariant from clock frequency) | | Perf. Monitoring | Performance Monitoring Counters (PMC) are not supported | | Hypervisor | Yes, Microsoft |
Krastanov commented 3 months ago

when this package is registered, this should be easier to do: https://github.com/c42f/JuliaLowering.jl

Krastanov commented 3 months ago

discussed more here https://github.com/c42f/JuliaLowering.jl/issues/2

Krastanov commented 1 week ago

close in favor of #100