Skip to content

ksakiyama/dragonffi_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DragonFFI Examples

DragonFFI a C Foreign Function Interface (FFI) library written in C++ and based on Clang/LLVM.

I coded some python examples using DragonFFI.

Motivation

LLVM Project announced about DragonFFI on this post. So I tried!

My Setting

  • Runtime
    • Python 3.6.3 :: Anaconda, Inc.
  • Installation
    • pip install pydffi

Easy Benchmark

Fibonacci

$ python fib_nrm.py 
Time:0.3381009101867676[sec]
$ python fib_opt.py 
Time:5.2928924560546875e-05[sec]
$ python call_fib_from_c_nrm.py 
Time:0.049577951431274414[sec]
$ python call_fib_from_c_opt.py 
Time:0.04542684555053711[sec]

Matmul

$ python matmul.py
Python:7.10671[sec]
C(FFI):0.03292[sec]
numpy :0.02811[sec]

About

Easy Examples of Python DragonFFI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published