https://github.com/Co-dfns/Co-dfns/releases/tag/v5.7.0 Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Innersource + Open Source + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} Co-dfns / Co-dfns Public * * Notifications You must be signed in to change notification settings * Fork 32 * Star 681 * Code * Pull requests 2 * Actions * Security * Insights Additional navigation options * Code * Pull requests * Actions * Security * Insights 1. Releases 2. v5.7.0 Co-dfns v5.7.0 Latest Latest Compare Choose a tag to compare [ ] Could not load tags Nothing to show {{ refName }} default (*) Loading View all tags @arcfide arcfide released this 10 Jul 14:21 * 1 commit to master since this release v5.7.0 b0b1198 New Features Performance Many of the new features here are internal adjustments intended to improve performance and runtime overheads. So far, we have been able to see a 15x or greater decrease in performance overheads on some basic benchmarks like naive nbody simulations. Graph Coloring Allocation The compiler now uses a graph coloring algorithm to allocate all intermediate arrays using an infinite register machine model in the runtime. This massively reduces the overhead of each function call and reduces the stack size consumption of each function to something approximating a minimal set of intermediate array values. It also eliminates the overhead within an expression call of pushing and popping values to and from a stack during execution. This eliminates significant amounts of reference counting overhead as well as eliminating the stack overheads. The allocator at present is not optimized, so for large programs, you may see an increase in compile time due to the register allocation. We intend to improve this performance in future releases. Preliminary dead code elimination We have begun to include some code to remove code paths that will never be hit during execution. In particular, during function specialization, we may need to ensure that we have implementations of functions for inputs that could result in a syntax error. In such cases, we will remove unnecessary code generation for code after the error occurs within a function. This may also eliminate some functions from being generated entirely, as they are on dead code paths. This reduces some of the generated code size and is a step in the direction towards eliminating unnecessary function specializations that will never be called. Constant Lifting Literal expressions in the compiler are now lifted into a statically and globally allocated space. Any reference to the same literal anywhere in a compiled unit will therefore point to the same globally allocated array. We also make use of this in referencing these global constants inside of the runtime microkernel to help improve performance. Constant lifting improves runtime performance in execution overhead as well as memory usage. Reduced reference counting As part of our move towards reducing the overall memory pressure on the system, we have reduced the number of reference counting operations that need to happen for many operations, improving performance further. Better and more precise releasing of temporary values We take advantage of type information that we have at compile time to generate more specific, type specific release calls to the runtime, which should also help to reduce some performance bottlenecks. Static arrays We now have the ability to distinguish between static arrays and CPU heap allocated arrays and GPU allocated arrays. For most small array values, we will use static allocation types, which prevents the need for allocating additional space for an array above and beyond its header. This means that most (small) arrays can now be created without needing to malloc heap space to hold their values. Monadic and Dyadic function call optimization When calling a primitive monadically or dyadically, we were previously dispatching to a general ambivalent function which could switch at runtime on the type of arguments it received. We now make this decision at compile time and produce a call directly to the arity-specific primitive function that we need. Additional fast paths We've introduced some additional fast paths to improve performance on commonly run hot spots in the runtime code. This includes reducing some operation costs in some code, while using specifically faster paths in some other code. Eliminate unnecessary GPU calls For some small array sizes, it does not make sense to rely on the GPU to do certain operations. We now avoid doing grading, index generation, or random number generation on the GPU for small array sizes. No more boxing We no avoid boxing array values which are mutable, and instead use a direct reference to their allocated space in memory. This avoids the need to allocate and manage separate boxes. Language Enhancements * Limited format support improvements * We've added support for the [?]TS niladic function Reliability and Bug Fixes: * Fixed an issue with some bindings to [?] receiving the incorrect type during code generation * Fixed an issue with incorrect stranding when a strand contained a bracketed index * External I-beam references no longer generate duplicate declarations * Fixed a bug where last axis replicate was being called instead of first-axis replicate * We now do a better job of producing runtime errors in cases of type mismatches, such as using a function where a value was expected * Fixed an issue with free variables being bound as strands Known issues * Register allocation is currently slow, and this can cause longer than normal compile times * LCM over floating point values can be unstable Assets 2 Loading All reactions Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.