Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea for optimization #211

Open
kaveh808 opened this issue Mar 6, 2023 · 9 comments
Open

Idea for optimization #211

kaveh808 opened this issue Mar 6, 2023 · 9 comments

Comments

@kaveh808
Copy link
Owner

kaveh808 commented Mar 6, 2023

If anyone is into optimizing some CL code using SBCL declarations, I suggest trying it on the src/plugins/isosurface.lisp file. The marching cubes algorithm takes several seconds to generate a mesh, as can be seen by running the demos in src/plugins/sdf.lisp.

It might be interesting to see how much this can be optimized, as SBCL has a high reputation for generating efficient code given the right declarations.

@kaveh808
Copy link
Owner Author

kaveh808 commented May 2, 2023

Sounds good. Please let me know the results of your tests.

@kaveh808
Copy link
Owner Author

kaveh808 commented May 2, 2023

A variety of shapes in kons-9/test/demo-sdf.lisp

@kaveh808
Copy link
Owner Author

kaveh808 commented May 3, 2023

There are examples of generating isosurfaces from points, curves, and polyhedra in kons-9/test/demo-isosurface.lisp

Also check out Demo 06 in kons-9/test/demo-flex-animator.lisp (screenshot below)

In general the demo files currently present simple illustrations of how to use the software.

Screen Shot 2023-05-03 at 10 51 11 AM

@kaveh808
Copy link
Owner Author

kaveh808 commented May 3, 2023

I added a screenshot above.

Sounds like an interesting project. Curious where it will lead to.

@kaveh808
Copy link
Owner Author

kaveh808 commented May 3, 2023

Don't know if this is relevant: https://sb-simd.common-lisp.dev

@kayomarz
Copy link
Collaborator

@foretspaisibles are you planning to work on this? else I will give it a try. I haven't done optimization/profiling in lisp before but would like to give it a shot.

@foretspaisibles
Copy link
Collaborator

foretspaisibles commented Jun 14, 2023

I am still planning but we can try together, it's more fun! :-) What do you think?

PS: Do you have opinions on what should be a proper benchmark?

@kayomarz
Copy link
Collaborator

That would be great, thanks :) let me know how and where I can help.

PS: Do you have opinions on what should be a proper benchmark?

By "proper benchmark" above, are you referring to identifying critical areas of code to profile before trying any optimization? Sorry its a naive question but I'm new to optimization and thought its better to clarify rather than remain unsure.

@kaveh808
Copy link
Owner Author

Parallel programming is something we haven't touched in kons-9 yet. Threads, SIMD, etc. I suspect the lowest hanging fruit is optimizing the OpenGL calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants