perimo
If you don't have that information, you can look at how your matrix will be accessed. Do you need fast access to random rows, or columns? Do you need to write new values? Are those values already in the sparsity structure?
All of these questions can lead you to choosing the right sparse format, but it does take some experience to know where to look.
- Typescript is a superset of Javascript (mostly), so we ported by converting all the Coffeescript sources to Javascript and renaming them with .ts extensions. There was a bit of cleanup involved in getting modules to play nice together, but most of the code ran without modification.
- The JS that the Typescript compiler generates is much easier to read, in part due to less "magic" in the language.
- It also makes performance much easier to reason about, for the same reasons. One issue that bit us several times was Coffeescript's auto-return feature, which was invisibly accumulating large arrays of values from our interpreter's bytecode loop! This is no longer a concern with the current Typescript codebase.
- The inner workings of the JVM are fairly complex, so enforcing types at compile-time actually does catch bugs before they happen.
The whole JVM lives in the browser, so you don't need to rely on hacks to "sanitize" user programs.