{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/NG/issues/3","labels_url":"https://api.github.com/repos/nodejs/NG/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/NG/issues/3/comments","events_url":"https://api.github.com/repos/nodejs/NG/issues/3/events","html_url":"https://github.com/nodejs/NG/issues/3","id":59438344,"number":3,"title":"Native FFI","user":{"login":"rauchg","id":13041,"avatar_url":"https://avatars.githubusercontent.com/u/13041?v=3","gravatar_id":"","url":"https://api.github.com/users/rauchg","html_url":"https://github.com/rauchg","followers_url":"https://api.github.com/users/rauchg/followers","following_url":"https://api.github.com/users/rauchg/following{/other_user}","gists_url":"https://api.github.com/users/rauchg/gists{/gist_id}","starred_url":"https://api.github.com/users/rauchg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rauchg/subscriptions","organizations_url":"https://api.github.com/users/rauchg/orgs","repos_url":"https://api.github.com/users/rauchg/repos","events_url":"https://api.github.com/users/rauchg/events{/privacy}","received_events_url":"https://api.github.com/users/rauchg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-03-02T04:48:24Z","updated_at":"2015-06-26T10:00:39Z","closed_at":null,"body":"Essentially supporting https://github.com/node-ffi/node-ffi directly\r\n(`require('ffi')`)"},"comment":{"url":"https://api.github.com/repos/nodejs/NG/issues/comments/115621475","html_url":"https://github.com/nodejs/NG/issues/3#issuecomment-115621475","issue_url":"https://api.github.com/repos/nodejs/NG/issues/3","id":115621475,"user":{"login":"arigo","id":1742914,"avatar_url":"https://avatars.githubusercontent.com/u/1742914?v=3","gravatar_id":"","url":"https://api.github.com/users/arigo","html_url":"https://github.com/arigo","followers_url":"https://api.github.com/users/arigo/followers","following_url":"https://api.github.com/users/arigo/following{/other_user}","gists_url":"https://api.github.com/users/arigo/gists{/gist_id}","starred_url":"https://api.github.com/users/arigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arigo/subscriptions","organizations_url":"https://api.github.com/users/arigo/orgs","repos_url":"https://api.github.com/users/arigo/repos","events_url":"https://api.github.com/users/arigo/events{/privacy}","received_events_url":"https://api.github.com/users/arigo/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T10:00:39Z","updated_at":"2015-06-26T10:00:39Z","body":"With a good JIT, a FFI can be a lot *faster* than any alternative.  This is the case about PyPy but I'm sure V8 and others are similar.  The JIT can basically generate raw C calls; that's the best performance possible.  By contrast, needing to go through some custom C API layer to access the objects is slower (because it needs a stable API that presents objects in a way that doesn't change all the time) and it cannot be optimized by the JIT (for example, if you make a temporary \"integer\" object, the JIT usually removes it; but if it escapes through the C API layer, it can't)."}}