<commit_before><commit_msg>adding an example<commit_after>@_silgen_name("_ctx_prepare")
func prepareContext(using buffer: UnsafeMutableRawPointer,
                    and stack: UnsafeMutableRawPointer,
                    running fn: ()->Void) -> Int

@_silgen_name("_ctx_switch")
func switchContext(from prev: UnsafeMutableRawPointer,
                   to new: UnsafeMutableRawPointer)
var x = 0
var func_reg_buf = UnsafeMutableRawPointer.allocate(bytes: 100, alignedTo: 4)
var stack_buf = UnsafeMutableRawPointer.allocate(bytes: 8000, alignedTo: 4)
var main_reg_buf = UnsafeMutableRawPointer.allocate(bytes: 100, alignedTo: 4) 

func hello() {
    switchContext(from: func_reg_buf, to: main_reg_buf)
}

for i in 0...100000000 {
    x = prepareContext(using: func_reg_buf, and: stack_buf, running: hello)
    switchContext(from: main_reg_buf, to: func_reg_buf)
}

{'fraction_non_alphanumeric': 0.09584295612009237, 'fraction_numerical': 0.02771362586605081, 'mean_word_length': 4.487341772151899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1308974', 'n_tokens_mistral': 308, 'n_tokens_neox': 271, 'n_words': 64}