nibi-lang / nibi

An interpreted list processing language inspired by Lisp
GNU Affero General Public License v3.0
3 stars 2 forks source link

114.flatten cell c #115

Closed bosley closed 1 year ago

bosley commented 1 year ago

(ノ◕ヮ◕)ノ✲゚。⋆ You've made a PR!

Before the code PR is merged, please ensure that the following checklist is completed.

Please be sure that the code follows the style as follows:

The above is just a loose formatting that has been used already throughout the C++ source code of Nibi, and we would like to keep things mostly uniform. In the future, an actual style guide may be created.

Description of work:

Please enter a description of your work here:

Flattened the cell_c object pretty substantially. Its about 1/2 the size it was before while maintaining the same functionality and still being 1-1 compatible with CFFI and no extra copies of data from C. 

I removed all data stored in the `std::any` in the cell and flattened it into raw pointers within the c_data union. bench shows slight improvement but its realistically about the same .

What was once `complex_data` is no more!