inspirit / jsfeat

JavaScript Computer Vision library.
MIT License
2.74k stars 372 forks source link

Support browsers without Float64Array #32

Closed jonnor closed 8 years ago

jonnor commented 10 years ago

PhantomJS, often use for headless browser testing does not support Float64Array. Currently that makes jsfeat fail right away, as the type is used in construction of the data_t class.

However, it looks like major parts of jsfeat works without Float64Array, so it would be good if this was made optional.

inspirit commented 10 years ago

i think u can avoid it without modifying jsfeat by providing shim for that type. smth like:

global.Float64Array = Float64Array || Array;

should be enough if i'm not mistaken

jonnor commented 10 years ago

We used a polyfill for it, problem is that execution time (of our tests) went up by about 10x.

inspirit commented 10 years ago

how can it went up if you use polyfill only for Float64? if you really dont use it it should not affect runtime performance