JuliaGeometry / OldMeshes.jl

A collection of tools for working with Meshes
Other
20 stars 12 forks source link

Speed up slice, backport to v0.1.x #53

Closed dreammaker closed 9 years ago

dreammaker commented 9 years ago

Just a few very low hanging performance fruits. I tried a few other modifications that seemed plausible, but couldn't get it much faster. Essentially all the time is currently spent it in BitArray set query for paired[i].

dreammaker commented 9 years ago

It would be nice if you could merge this, tag it as v0.1.1, and release to METADATA. Thanks!

sjkelly commented 9 years ago

Thanks for doing this! Anything else that could be backported? I'm currently mucking around in ImmutableArrays to fix this there. If I don't fix this today I'll merge this and tag 0.1.1.

Also just to keep you appraised of master, I'm currently working on making it easy to switch the default array type used by Meshes. This is to be agnostic to ImmutableArrays, FixedSizedArrays, and forthcoming tuple changes in Base.

dreammaker commented 9 years ago

@sjkelly, there are only a few commits on master that aren't on v0.1.x. They look related to your refactoring, so it's hard for me to tell.

sjkelly commented 9 years ago

I have added the equality fix to ImmutableArrays. I will tag a release shortly. Would you still like a tagged release for the @inbounds optimization? There are a lot bigger fixes we could backport. I'll take a look at a few that might be quick. I'll add you as a collaborator so you can backport and tag whatever you think is good. Testing your stuff on master might be good because I am working on making things more generic. This might be useful so you could tell Meshes to do things like use a Clipper.Point anywhere there is a 2D point. Ironically, this is one of the most unstable parts of geometric types

dreammaker commented 9 years ago

@sjkelly, the new equality in ImmutableArrays is probably good for now. I can wait for a Meshes release.

I can try Meshes master branch when I have some time, but I really can't use it if it doesn't work on julia 0.3.

dreammaker commented 9 years ago

Is there any way we can get master working on both julia 0.3 and 0.4 using compat? We got Polygons.jl running on both.

sjkelly commented 9 years ago

Everything should still work on 0.3. I'm not really sure if breaking 0.3 compatibility is really a good idea yet. The reason for the 0.1.x branch was to ensure API stability, so 0.4 fixes should also go there too I'd say.

dreammaker commented 9 years ago

@sjkelly, I cherry-picked two more of your commits. I think this is ready to merge.

Also, I tried Meshes master on Euclid using julia 0.3 and all tests passed. I believe this commit was key.

sjkelly commented 9 years ago

Looks good! If you could tag a v0.1.1 that would be really helpful too.

dreammaker commented 9 years ago

I created a release and submitted a pull request to METADATA.