Description
For the built-in programming language(or called Wolfram Language) of Wolfram Mathematica, I think it is much easier and simpler to learn than other computer language(such as C/C++ or java) according to my learning experience. However, in some cases, the performance/efficiency of user-defined is very critical. For instance, I have been learning the NURBS theory for two years with the help of the classical textbook "The NURBS Book" written by Les Piegl and Wayne Tiller. In this process, I also developed a package CAGD via the pure Wolfram Language.
About the performance turning of some functions that in my package, I believe Compile[]
and CompilationTarget -> "C"
are very useful tricks, here is an example that using Compile[]
and CompilationTarget -> "C"
:
Nevertheless, when I added the option SplineWeights
in CAGDBSplineFunction[]
, its performance was much slower(about $10$ times) than built-in BSplineFunction[]
, please see the below screenshots:
Here, BSplineFunction[]
was a compiled version to C code. In addition, I'm not surprised at the high performance of built-in BSplineFunction[]
because I know it was implemented in low level language(maybe C++/C) rather than its own Wolfram Language.
Learning about LibraryLink
To improve the performace/efficiency of my packege CAGD, I recently decided to rewrite some critical/key functions in C, then I would like to utilize the Library Link technique to link the C code to Mathematica.
Firstly, I read the documentation about the that technique via Wolfram LibraryLink User Guide, however, I discovered that it was not a easy thing to learn that tutorial. For me, I only learned C and Visual Basic when I was a freshman seven years ago.
Question
Is there some simple mehtods to learn the Library Link for the newcomer?
What other knowledge(about the computuer language) need to be learned?