Skip to content

Conversation

@bgamari
Copy link
Contributor

@bgamari bgamari commented Feb 26, 2016

I was quite curious to know how much of an improvement this would bring so I gave it a quick try. This is quite hacked, brought just far enough to measure the improvement (which is significant, with compilation taking on the order of seconds and an orders of magnitude reduction in compiler allocations). That being said, you might find it to be a useful start. My next step would probably be to provide a Data.Vector.Storable.Sized module which exports a type synonym,

type Vec = Data.Vector.Generic.Sized.Vec Data.Vector.Storable.Vector

and perhaps reexport the remainder of Data.Vector.Generic.Sized. You could also do the same for the remaining vector varieties.

@expipiplus1
Copy link
Owner

This looks really useful.
I'd like to incorporate these changes by modifying the generator program instead of the source itself. The generator code is pretty horrific at the moment so I'd be more than happy to put these in myself.

The place to change would be https://github.com/expipiplus1/vulkan/blob/master/generate/src/Write/TypeConverter.hs#L99

Thanks!

@expipiplus1
Copy link
Owner

I've started a little library for this as it's not really vulkan specific https://github.com/expipiplus1/vector-sized

vulkan 1.1 is now using vector-sized.

Thanks for the head start with this!

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

Successfully merging this pull request may close these issues.

2 participants