Skip to content

mkchoi212/Transducers

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Transducers in Swift

This repo contains a .playground file and various benchmarking files that attempt to explain what transducers are and how to implement them in Swift.

The markdown view in Playground be toggled by switching Editor -> Show Rendered Markup || Show Raw Markup in the Xcode menus.

Benchmark

The Benchmark directory contains the Attabench Xcode project file that was used to generate all the performance graphs used in the blog.

In addition, assembly code of all versions are available for a more in depth comparison. The file used to generate the assembly is AssemblyTest.swift. If you want to play around with it, use the following command to generate your own .asm files

xcrun -sdk macosx swiftc -emit-assembly main.swift > result.asm

Blog Post

If you want to check out what this Playground is about but don't want to download it, here a link to my blog post that is basically its copy.

Reddit Thread

Got something to say? Get on Reddit!

Reddit Link Pt. 1

Reddit Link Pt. 2

License

This project is licensed under the terms of the MIT license. See the license file.

Releases

No releases published

Packages

No packages published